如何解决为什么我收到供应商帐户没有确认电子邮件
我正在使用 Paypal 通过信用卡在 android 中进行交易。但我收到一个错误:- 为什么我收到供应商帐户没有确认的电子邮件。我不明白什么是问题
活动
public class MainActivity extends AppCompatActivity {
private static PayPalConfiguration config = new PayPalConfiguration()
.environment(PayPalConfiguration.ENVIRONMENT_SANDBOX)
.clientId("AVxCKg9vnFKxNXLU5LLylEOnGCnsG8UiN300FlmY37zI4oKdrpyiuR_zutUn77rKSVxC377x0jM_uCPk").acceptCreditCards(true);
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button pay = findViewById(R.id.click);
pay.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent serviceConfig = new Intent(MainActivity.this,PayPalService.class);
serviceConfig.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION,config);
startService(serviceConfig);
PayPalPayment payment = new PayPalPayment(new BigDecimal("5.65"),"USD","com.example.paypalkotlin",PayPalPayment.PAYMENT_INTENT_SALE);
Intent paymentConfig = new Intent(MainActivity.this,PaymentActivity.class);
paymentConfig.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION,config); //send the same configuration for restart resiliency
paymentConfig.putExtra(PaymentActivity.EXTRA_PAYMENT,payment);
startActivityForResult(paymentConfig,0);
}
});
}
@Override
protected void onActivityResult(int requestCode,int resultCode,@Nullable Intent data) {
super.onActivityResult(requestCode,resultCode,data);
if (resultCode == Activity.RESULT_OK){
PaymentConfirmation confirm = data.getParcelableExtra(PaymentActivity.EXTRA_RESULT_CONFIRMATION);
if (confirm != null){
try {
Log.e("sampleapp",confirm.toJSONObject().toString(4));
} catch (JSONException e) {
Log.e("sampleapp","an extremely unlikely failure occurred: ",e);
}
}
} else if (resultCode == Activity.RESULT_CANCELED) {
Log.e("sampleapp","The user canceled.");
} else if (resultCode == PaymentActivity.RESULT_EXTRAS_INVALID) {
Log.e("sampleapp","An invalid Payment or PayPalConfiguration was submitted. Please see the docs.");
}
}
}
依赖
implementation 'com.paypal.sdk:paypal-android-sdk:2.14.5'
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。