【问题标题】:Android PayPal adaptive payment integrationAndroid PayPal 自适应支付集成
【发布时间】:2011-11-11 01:21:48
【问题描述】:

大家好,

    I need to integrate paypal guest payment via credit card.


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


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

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

【问题讨论】:

  • 我建议通过paypal.com/dts 向PayPal 开发人员技术服务部咨询——这更像是一个功能问题,除非我们之前偶然发现,否则我们不太可能知道答案。鉴于您尚未收到回复,因此可能值得与来源核实。当您找到答案时,当然欢迎与我们分享!
  • 是的,我做了一点,完成后会分享....

标签: android paypal paypal-adaptive-payments


【解决方案1】:

Paypal 允许通过信用卡付款。但现在它已被弃用。如果您想使用它,请从您在 Android 中的应用程序等级中删除 exclude creditcard.io

【讨论】:

    【解决方案2】:

    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;
            }
    

    【讨论】:

    • @Patrick ,您能否分享使用 Android 进行自适应支付的完整示例或代码?
    猜你喜欢
    • 2014-04-10
    • 1970-01-01
    • 1970-01-01
    • 2015-07-19
    • 2021-08-04
    • 2012-04-22
    • 2014-10-13
    • 2013-11-10
    • 2013-11-07
    相关资源
    最近更新 更多