PayPal Integration, how would I define the receiver account?

后端 未结 2 643
余生分开走
余生分开走 2021-02-14 03:11

I\'m working on a very small ecommerce software that allows users to put their products up in order to get customers to see them and buy them.

I would like to offer the

相关标签:
2条回答
  • 2021-02-14 03:33

    Your users need to Grant API Permissions for your application to make API calls on their behalf. Then you would still use your own API username, password, and signature, but you'd also include a SUBJECT parameter along with those. The SUBJECT value would be the email address or PayPal merchant ID of a user who has granted permissions for your app.

    Users can grant permissions manually through their PayPal profile, or you can build this into your app using the Permissions API. If you go with the permissions API, though, you end up using tokens in the header (OAuth) as opposed to the SUBJECT parameter.

    == EDIT ==

    It seems that this must have been updated in an API version release or something. I just ran the following in the sandbox with no issues.

    [REQUESTDATA] => Array
        (
            [USER] => sandbo_1215254764_biz_api1.angelleye.com
            [PWD] => 12xxxx74
            [VERSION] => 109.0
            [BUTTONSOURCE] => AngellEYE_PHPClass
            [SIGNATURE] => AiKZhEExxxxxxxxz2qxKx96W18v
            [METHOD] => DoExpressCheckoutPayment
            [TOKEN] => EC-9SG69555XT1155150
            [PAYERID] => YW66KXBKJRRES
            [RETURNFMFDETAILS] => 1
            [PAYMENTREQUEST_0_AMT] => 100.00
            [PAYMENTREQUEST_0_CURRENCYCODE] => USD
            [PAYMENTREQUEST_0_ITEMAMT] => 80.00
            [PAYMENTREQUEST_0_SHIPPINGAMT] => 15.00
            [PAYMENTREQUEST_0_TAXAMT] => 5.00
            [PAYMENTREQUEST_0_DESC] => This is a test order.
            [PAYMENTREQUEST_0_NOTETEXT] => This is a test note before ever having left the web site.
            [PAYMENTREQUEST_0_PAYMENTACTION] => Sale
            [PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID] => sandbo_1204199080_biz@angelleye.com
            [L_PAYMENTREQUEST_0_NAME0] => Widget 123
            [L_PAYMENTREQUEST_0_DESC0] => Widget 123
            [L_PAYMENTREQUEST_0_AMT0] => 40.00
            [L_PAYMENTREQUEST_0_NUMBER0] => 123
            [L_PAYMENTREQUEST_0_QTY0] => 1
            [L_PAYMENTREQUEST_0_ITEMURL0] => http://www.angelleye.com/products/123.php
            [L_PAYMENTREQUEST_0_NAME1] => Widget 456
            [L_PAYMENTREQUEST_0_DESC1] => Widget 456
            [L_PAYMENTREQUEST_0_AMT1] => 40.00
            [L_PAYMENTREQUEST_0_NUMBER1] => 456
            [L_PAYMENTREQUEST_0_QTY1] => 1
            [L_PAYMENTREQUEST_0_ITEMURL1] => http://www.angelleye.com/products/456.php
        )
    

    The payment wound up in the sandbo_1204199080_biz@angelleye.com account. Just make sure you have the same value set in both SetExpressCheckout and DoExpressCheckoutPayment and you should be fine.

    0 讨论(0)
  • 2021-02-14 03:35

    You can add this parameter:

    PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID=someone@gmail.com
    

    other parameters can be configured also for that receiver,like:

    PAYMENTREQUEST_0_CURRENCYCODE=USD
    PAYMENTREQUEST_0_AMT=300
    PAYMENTREQUEST_0_ITEMAMT=200
    PAYMENTREQUEST_0_TAXAMT=100
    PAYMENTREQUEST_0_DESC=Summer Vacation trip
    PAYMENTREQUEST_0_INSURANCEAMT=0
    PAYMENTREQUEST_0_SHIPDISCAMT=0
    PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID=someone@gmail.com
    PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED=false
    PAYMENTREQUEST_0_PAYMENTACTION=Order
    PAYMENTREQUEST_0_PAYMENTREQUESTID=CART26488-PAYMENT0
    

    Note: you can add up to 10 receivers, just change the index like:

    PAYMENTREQUEST_1_.....
    PAYMENTREQUEST_2_.....
    
    0 讨论(0)
提交回复
热议问题