2

大家好,

    I need to integrate paypal guest payment via credit card.


据我所知,android paypal sdk 允许您通过 paypal 帐户付款。


所以我搜索的内容是,我需要自适应支付来实现它,但我没有取得任何成功。

那么你们中的任何人都可以提供某种帮助............吗?

4

2 回答 2

2

Paypal 允许通过信用卡支付。但现在它已被贬低。如果你想使用它,请从你的应用程序中删除 creditcard.io 在 android

于 2016-12-20T07:38:27.843 回答
0

Android PayPal 自适应支付集成

first implement method
   private void initLibrary() {
        PayPal pp = PayPal.getInstance();
        if(pp == null) {
            pp = PayPal.initWithAppID(this, PAYPAL_APP_ID, PayPal.ENV_SANDBOX);
            pp.setLanguage("en_US"); // Sets the language for the library.
            pp.setFeesPayer(PayPal.FEEPAYER_EACHRECEIVER);
//            pp.setShippingEnabled(true);
            pp.setDynamicAmountCalculationEnabled(false);
        }
    }    

===================================

**paypal button click event code**

     double secondary_payment = 0;
    double primary_payment = 0;

      PayPalAdvancedPayment advPayment = makeChainedPayment(secondary_payment,primary_payment,"primary_email","secondary_email");

      Intent checkoutIntent = PayPal.getInstance().checkout(advPayment, your_current_activity);
                    startActivityForResult(checkoutIntent, 1); 

    =============================================
    private PayPalAdvancedPayment makeChainedPayment(double priceSecondary, double pricePrimary, String primary_email, String secondary_email) {
            PayPalAdvancedPayment payment = new PayPalAdvancedPayment();
            payment.setCurrencyType("USD");
    //        payment.setMerchantName("PushND");
            BigDecimal bigDecimalPrimary=new BigDecimal(pricePrimary);
            PayPalReceiverDetails receiverPrimary = new PayPalReceiverDetails();
            receiverPrimary.setRecipient(primary_email);
            //receiverPrimary.setRecipient("adaptive_receiver_1@pushnd.com");
            receiverPrimary.setSubtotal(bigDecimalPrimary);
            receiverPrimary.setIsPrimary(true);
            payment.getReceivers().add(receiverPrimary);

            PayPalReceiverDetails receiverSecondary= new PayPalReceiverDetails();
            receiverSecondary.setRecipient(secondary_email);
            BigDecimal bigDecimalSecond=new BigDecimal(priceSecondary);
            receiverSecondary.setSubtotal(bigDecimalSecond);
            payment.getReceivers().add(receiverSecondary);

            return payment;
        }
于 2016-04-28T05:19:02.340 回答