Doesn't the SELLERPAYPALACCOUNTID work in the sandbox? - paypal

i use the SetExpressCheckout for my website. On this side I have some products. Each product has an other recipient. So I fill the parameter "PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID"
$padata = '&CURRENCYCODE='.urlencode($CurrencyCode).
'&PAYMENTACTION=Sale'.
'&ALLOWNOTE=1'.
'&PAYMENTREQUEST_0_SELLERPAYPALACCOUNTID='.$email.
'&PAYMENTREQUEST_0_CURRENCYCODE='.urlencode($CurrencyCode).
'&PAYMENTREQUEST_0_AMT='.urlencode($ItemTotalPrice).
'&PAYMENTREQUEST_0_ITEMAMT='.urlencode($ItemTotalPrice).
'&L_PAYMENTREQUEST_0_QTY0='. urlencode($ItemQty).
'&L_PAYMENTREQUEST_0_AMT0='.urlencode($ItemPrice).
'&L_PAYMENTREQUEST_0_NAME0='.urlencode($ItemName).
'&L_PAYMENTREQUEST_0_NUMBER0='.urlencode($ItemNumber).
'&AMT='.urlencode($ItemTotalPrice).
'&RETURNURL='.urlencode($PayPalReturnURL ).
'&CANCELURL='.urlencode($PayPalCancelURL);
But when I get the success page, the array of the transaction shows the recipient of die API-Account. Is that a problem of the sandbox or is it my problem?
Thanks for your answers and help!

Related

PayPal Express checkout SALUTATION not received in response

I am using PayPal Express checkout for payment. I need the SALUTATION of the user along with other shipping details. But it seems that only FIRSTNAME and LASTNAME are got from the response. What should be done to get the SALUTATION in the response as well.
This is the response got from GetExpressCheckoutDetails
TOKEN:EC%2d9F317807RE7947807
BILLINGAGREEMENTACCEPTEDSTATUS:0
CHECKOUTSTATUS:PaymentActionCompleted
TIMESTAMP:2016%2d05%2d12T11%3a54%3a16Z
CORRELATIONID:c50a6ba8b3002
ACK:Success
VERSION:93
BUILD:000000
EMAIL:nihal%40gmail%2ecom
PAYERID:2CLDDRMSKLDMA
PAYERSTATUS:unverified
FIRSTNAME:Nihal
LASTNAME:Mohammad
COUNTRYCODE:IN
SHIPTONAME:Nihal
SHIPTOSTREET:Chakkorathukulam
SHIPTOSTREET2:Nadakkavu
SHIPTOCITY:Calicut
SHIPTOSTATE:KOZHIKODE
SHIPTOZIP:670006
SHIPTOCOUNTRYCODE:IN
SHIPTOCOUNTRYNAME:India
ADDRESSSTATUS:Unconfirmed
CURRENCYCODE:USD
AMT:10%2e00
SHIPPINGAMT:0%2e00
HANDLINGAMT:0%2e00
TAXAMT:0%2e00
INSURANCEAMT:0%2e00
SHIPDISCAMT:0%2e00
PAYMENTREQUEST_0_CURRENCYCODE:USD
PAYMENTREQUEST_0_AMT:10%2e00
PAYMENTREQUEST_0_SHIPPINGAMT:0%2e00
PAYMENTREQUEST_0_HANDLINGAMT:0%2e00
PAYMENTREQUEST_0_TAXAMT:0%2e00
PAYMENTREQUEST_0_INSURANCEAMT:0%2e00
PAYMENTREQUEST_0_SHIPDISCAMT:0%2e00
PAYMENTREQUEST_0_TRANSACTIONID:2KR64654T7820071F
PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED:false
PAYMENTREQUEST_0_SHIPTONAME:Nihal
PAYMENTREQUEST_0_SHIPTOSTREET:Chakkorathukulam
PAYMENTREQUEST_0_SHIPTOSTREET2:Nadakkavu
PAYMENTREQUEST_0_SHIPTOCITY:Calicut
PAYMENTREQUEST_0_SHIPTOSTATE:KOZHIKODE
PAYMENTREQUEST_0_SHIPTOZIP:670006
PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE:IN
PAYMENTREQUEST_0_SHIPTOCOUNTRYNAME:India
PAYMENTREQUEST_0_ADDRESSSTATUS:Unconfirmed
PAYMENTREQUESTINFO_0_TRANSACTIONID:2KR64654T7820071F
PAYMENTREQUESTINFO_0_ERRORCODE:0
In PayPal documentation they say it is available in response.
see here
Its a simple problem. I was using the merchant account for US region. And the US region does not need the SALUTATION part for their address. That was why the response was not returning the salutation part i guess.

Paypal [error 10004] Invalid arguments on DoExpressCheckoutPayment

I'm having problems capturing Paypal payment through DoExpressCheckoutPayment method. Paypal failed and returned with only one 10004 error which said
Transaction refused because of an invalid argument. See additional error messages for details.
However, Paypal did not specify which argument was invalid.
Is there a way to request Paypal to provide more details in this case?
Below are arguments which I post to Paypal using the NVP API.
DoExpressCheckoutPayment
L_PAYMENTREQUEST_0_NAME0=Hieu+Nguyen
L_PAYMENTREQUEST_0_AMT0=20
L_PAYMENTREQUEST_0_QTY0=1
PAYMENTREQUEST_0_AMT=20
PAYMENTREQUEST_0_ITEMAMT=20
PAYMENTREQUEST_0_SHIPTOPHONENUM=452435243
EMAIL=hieu%40thirststudios.com
METHOD=DoExpressCheckoutPayment
VERSION=124.0
PWD=[masked]
USER=[masked]
SIGNATURE=[masked]
PAYMENTREQUEST_0_PAYMENTACTION=Sale
RETURNURL=http%3A%2F%2Fhakuba.centralsnowsports.com.au.local%2F%3FACT%3D53%26G%3DVXdJWStNWGFNSTIvQ09mNmE1cXJWSXlDN0lqYXlQdnNZRjBHL2NoaWpMNVAwNGlaN1A2K1crNVRBbUpmNG1yY05NTC9Mb1hHUVBQL0VsTG9rUEFzbFE9PQ%3D%3D%26M%3DVldsZFNoZVVsRTBJNjFLbmxZSWRtbitQVkZvNEI1M2hrQXNUb2hBZHozQnhCcUVFZkJmM3B0VVBvek1vV3ZPdGpubXJuQlNHd1FaU01wcDNYZVlGMVE9PQ%3D%3D
CANCELURL=http%3A%2F%2Fhakuba.centralsnowsports.com.au.local%2F%3FACT%3D53%26G%3DejNhR1BDSlhRZ1o0MzZoWFAvVmttY2pzMzF5amhqbDZzV2NMemoxbjcvY2dPQTZ4ZlVtL0ltRUx0dmkwUlV0Y3dpRDBuUWxJNk12cnREVDQ4Z1NYMWc9PQ%3D%3D%26M%3DR013TVBmL1FHZkRtOWVRSzVUL0JqMmZYa1B4RTJVNFptdjBPSGJFTlJqK2VSdkU5V25FczM4WEs2WkcwK3FPaWxwYkFSaW1JbGpHOVJSbWpTRjR4N3c9PQ%3D%3D
PAYMENTREQUEST_0_CURRENCYCODE=JPY
ALLOWNOTE=0
CHANNELTYPE=Merchant
PAYMENTREQUEST_0_ALLOWEDPAYMENTMETHOD=InstantPaymentOnly
LOCALECODE=US
ADDROVERRIDE=0
NOSHIPPING=1
SOLUTIONTYPE=Sole
LANDINGPAGE=Billing
TOKEN=EC-59S20038JL208993V
PAYERID=XAC7EG8Y2M5D6
IPADDRESS=hakuba.centralsnowsports.com.au.local
[Updated] more API call argument
SetExpressCheckout
L_PAYMENTREQUEST_0_ITEMCATEGORY0=Physical
L_PAYMENTREQUEST_0_NAME0=Hieu+Nguyen
L_PAYMENTREQUEST_0_AMT0=20
L_PAYMENTREQUEST_0_QTY0=1
PAYMENTREQUEST_0_AMT=20
PAYMENTREQUEST_0_ITEMAMT=20
PAYMENTREQUEST_0_SHIPTOPHONENUM=3143214
EMAIL=hieu%40thirststudios.com
METHOD=SetExpressCheckout
VERSION=124.0
PWD=[masked]
USER=[masked]
SIGNATURE=[masked]
PAYMENTREQUEST_0_PAYMENTACTION=Sale
RETURNURL=http%3A%2F%2Fhakuba.centralsnowsports.com.au.local%2F%3FACT%3D53%26G%3DRlN5WWJUS21HeGd6cTlSTm95MFpZMkxTTTdMZEZ1OUV6S2FIY0pYSjVnM1M0d2FjQjVIQnlqQ3F2d3NFSHRhZHB3bTVnRUE3T1NzN0EwOTcvOVlIQ3c9PQ%3D%3D%26M%3DYWNEUGhhemNVRzNpM0liMEVSUi94TmxkRDZRdmM2R3UrTUh0c2x1dFgwZ2tTNHJjV2lRUHBMWjR6d29vTkxXa3VRUnRPM0xNcnoyYlNHV2NKU2kzb2c9PQ%3D%3D
CANCELURL=http%3A%2F%2Fhakuba.centralsnowsports.com.au.local%2F%3FACT%3D53%26G%3DWnJzWDBWU1JaZndldStIY1FUNjFUWlNyTWYwR0N4NlRQK0VnajAvRjF2bFViZlVhZWphU0o3M1Z5dlNrdWlHOG4rRGd6OUdHNHJQaVhMa0tzamZvcnc9PQ%3D%3D%26M%3DemsxeGV1cnZ4a2JVWnhZRHNaU0ExTHBOaEp6dUQ1b2hiTVF5MXVxMjZyaFh1aFRhUGQvZ0M3dlZGT2dFU0FUelU3bjR6Qm5VVFBLT2xPSlJTN3ROUmc9PQ%3D%3D
PAYMENTREQUEST_0_CURRENCYCODE=JPY
ALLOWNOTE=0
CHANNELTYPE=Merchant
PAYMENTREQUEST_0_ALLOWEDPAYMENTMETHOD=InstantPaymentOnly
LOCALECODE=US
ADDROVERRIDE=0
NOSHIPPING=1
SOLUTIONTYPE=Sole
LANDINGPAGE=Billing
GetExpressCheckoutDetails
METHOD=GetExpressCheckoutDetails
VERSION=124.0
PWD=[masked]
USER=[masked]
SIGNATURE=[masked]
TOKEN=EC-75541725B7341060R
Update: For the record, the problem resolved itself after a few days. This must be an issue with Paypal internal engine. Still, we ended up moving away from Paypal after this incident.

Paypal express chekout blank order summary

I got a problem on my paypal's order summary, nothing appears except total order:
here's my request (took from paypal's site, https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ECCustomizing/)
&PAYMENTREQUEST_0_PAYMENTACTION=Sale
&L_PAYMENTREQUEST_0_NAME0=10% Decaf Kona Blend Coffee
&L_PAYMENTREQUEST_0_NUMBER0=623083
&L_PAYMENTREQUEST_0_DESC0=Size: 8.8-oz
&L_PAYMENTREQUEST_0_AMT0=9.95
&L_PAYMENTREQUEST_0_QTY0=2
&L_PAYMENTREQUEST_0_NAME1=Coffee Filter bags
&L_PAYMENTREQUEST_0_NUMBER1=623084
&L_PAYMENTREQUEST_0_DESC1=Size: Two 24-piece boxes
&L_PAYMENTREQUEST_0_AMT1=39.70
&L_PAYMENTREQUEST_0_QTY1=2
&PAYMENTREQUEST_0_ITEMAMT=99.30
&PAYMENTREQUEST_0_TAXAMT=2.58
&PAYMENTREQUEST_0_SHIPPINGAMT=3.00
&PAYMENTREQUEST_0_HANDLINGAMT=2.99
&PAYMENTREQUEST_0_SHIPDISCAMT=-3.00
&PAYMENTREQUEST_0_INSURANCEAMT=1.00
&PAYMENTREQUEST_0_AMT=105.87
&PAYMENTREQUEST_0_CURRENCYCODE=USD
&ALLOWNOTE=1
And the cmd express checkout call:
https://www.sandbox.paypal.com/webscr
&cmd=_express-checkout
&token=EC%2d8KH91006BV366882T
&useraction=commit
Did i missed something?
Thanks in advance !

PayPal Using Payflow to create Recurring Payment with PayPal account

My clients don't want to handle credit card data so I have implemented 2 options, 1) PayPal Advanced with Hosted Pages, and 2) PayPal Pro Transparent redirect. I am able to create recurring payments by
Getting my secure token
Committing a transaction
Converting transaction to Recurring Billing Profile
PayPal requires that I give the user the option to pay with a PayPal account but when I convert that payment to a RBP and then let it create a transaction the trans fails with result 7 - Field Format Error. I notice that the RBP created has no account number.
With option 1 I think I'm out of luck yes?
With option 2, I use Payflow.net dll to process the EC which works fine (see code sample). Is there a code sample somewhere on how to create a RBP with a token instead of a CC num or BAID?
...
partner = pageSettings.PageSettings["PayPalPartner"];
vendor = pageSettings.PageSettings["PayPalLogin"];
user = pageSettings.PageSettings["PayPalUser"];
pwd = Utilities.DecryptSettingValue(pageSettings.PageSettings["PayPalPassword"])
UserInfo creds = new UserInfo(user, vendor, partner, pwd);
string url = ConfigurationManager.AppSettings.Get("PayflowLive");
PayflowConnectionData connection = new PayflowConnectionData(url);
ECDoRequest doRequest = new ECDoRequest(token, payerID);
PayPalTender tender = new PayPalTender(doRequest);
Invoice inv = new Invoice();
inv.Amt = new Currency(amount, "USD");
inv.Comment1 = fundName;
SaleTransaction trans = new SaleTransaction(creds, connection, inv, tender, PayflowUtility.RequestId);
Response resp = trans.SubmitTransaction();
I don't have the code but I can direct you on how you can create the recurring profile using the PayPal Payments . It includes the four steps :
1. Call the SetExpressCheckout API
VENDOR=XXXXXXX&PARTNER=XXXXXXX&USER=XXXXXXXXX&PWD=XXXXXX&TRXTYPE=A&ACTION=S&TENDER=P&RETURNURL=http://return.com&CANCELURL=http://cancel.com&AMT=0.00&BA_DESC=purchase Time magazine&BILLINGTYPE=MerchantInitiatedBilling&PAYMENTTYPE=any&BA_CUSTOM=magazine subscription
NVP Response:
RESULT=0
RESPMSG=Verified
TOKEN=EC-8DA60888D41196708
CORRELATIONID=f4df94a3345b6
2.Redirect the customer using the generated token :
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-8DA60888D41196708
3. Once the buyer accept the agreement use the token to get the billing agreement id
NVP Request:
VENDOR=XXXXXX&PARTNER=XXXXXXX&USER=XXXXXXXX&PWD=XXXXX&TRXTYPE=A&ACTION=X&TENDER=P&TOKEN=EC-8DA60888D41196708
NVP Response:
RESULT=0
PNREF=B1PP7A2F8154
RESPMSG=Approved
TOKEN=EC-8DA60888D41196708
CORRELATIONID=49d6b0037408
BAID=B-6A290557S1180001J
4. After getting BAID , make a call to create the recurring billing using BAID
NVP Request:
VENDOR=XXXX&PARTNER=XXXX&USER=XXXXXX&PWD=XXXXX&TRXTYPE=R&TENDER=P&ACTION=A&PROFILENAME=RegularSubscription&AMT=4.46&BAID=B-6A290557S1180001J&START=09212014&PAYPERIOD=WEEK&TERM=12&MAXFAILPAYMENTS=1&RETRYNUMDAYS=1&CURRENCY=USD
NVP Response:
RESULT=0
RPREF=R1P57A2F8538
PROFILEID=RT0000000010
RESPMSG=Approved

paypal checkout display shipping costs but does not include them in transaction

I do not know if the issue is in code or the paypal account settings. Paypal displays correctly the shipping cost, it displays the correct total (item price + shipping),
but in fact, the transactions includes only the item price, not the shipping costs.
I have been unable to find out what is wrong. if paypal can display it correctly, why cant it include it properly in the transaction ?
here is the request sent to paypal:
$padata = '&CURRENCYCODE='.urlencode($PayPalCurrencyCode).
'&PAYMENTACTION=Sale'.
'&ALLOWNOTE=1'.
'&PAYMENTREQUEST_0_CURRENCYCODE='.urlencode($PayPalCurrencyCode).
'&PAYMENTREQUEST_0_AMT='.urlencode($TotalPrice).
'&PAYMENTREQUEST_0_ITEMAMT='.urlencode($ItemTotalPrice).
'&L_PAYMENTREQUEST_0_QTY0='. urlencode($ItemQty).
'&L_PAYMENTREQUEST_0_AMT0='.urlencode($ItemPrice).
'&PAYMENTREQUEST_0_SHIPPINGAMT='.urlencode($deliveryCost).
'&L_PAYMENTREQUEST_0_NAME0='.urlencode($ItemName).
'&L_PAYMENTREQUEST_0_NUMBER0='.urlencode($ItemNumber).
'&AMT='.urlencode($ItemTotalPrice).
'&RETURNURL='.urlencode($PayPalReturnURL ).
'&CANCELURL='.urlencode($PayPalCancelURL);
The param for shipping that I used is :
PAYMENTREQUEST_0_SHIPPINGAMT
is it correct ? is a complementary one needed ?
Are you supplying all of your PAYMENTREQUEST_0_* and L_PAYMENTREQUEST_0_* variables in your DoExpressCheckoutPayment call as well as your SetExpressCheckout call?
SetExpressCheckout will control what the buyer sees when they go to check out on PayPal. DoExpressCheckoutPayment will control what the buyer is actually charged for. Therefore, if you want your shipping charge to be included in the transaction, you need to make sure that it's included in both calls.
for the records, correct params for DoExpressCheckoutPayment :
$padata = '&TOKEN='.urlencode($token).
'&PAYERID='.urlencode($playerid).
'&PAYMENTACTION='.urlencode("SALE").
'&PAYMENTREQUEST_0_CURRENCYCODE='.urlencode($PayPalCurrencyCode).
'&PAYMENTREQUEST_0_SHIPPINGAMT='.urlencode($deliveryCost).
'&PAYMENTREQUEST_0_AMT='.urlencode($TotalPrice).
'&PAYMENTREQUEST_0_ITEMAMT='.urlencode($ItemTotalPrice).
'&CURRENCYCODE='.urlencode($PayPalCurrencyCode);