Reputation: 1607
I did what necessarily the latest available documentation says in integrating the PayPal in our shop system. I just found out that it seems like there PAYMENTREQUEST_n_PAYMENTACTION parameter in NVP.
I get payment details using the token and PayerID returned by SetExpressCheckout. When I output my returned cURL, I just found out this:
[CHECKOUTSTATUS] => PaymentActionNotInitiated
What seems to be the problem?
I use this query in cURL:
// Prepare PayPal API URL
$url = "https://api-3t.sandbox.paypal.com/nvp";
// $PAYMENTACTION = "Sale"
// Prepare PayPal NVP (Name-Value Pair) payment request
$nvp = "METHOD=" . $SETMETHOD;
$nvp .= "&VERSION=" . $VERSION;
$nvp .= "&USER=" . $USERNAME;
$nvp .= "&PWD=" . $PASSWORD;
$nvp .= "&SIGNATURE=" . $SIGNATURE;
$nvp .= "&PAYMENTREQUEST_0_PAYMENTACTION=" . $PAYMENTACTION;
$nvp .= "&PAYMENTREQUEST_0_CURRENCYCODE=" . $CURRENCY;
$nvp .= "&SOLUTIONTYPE=" . $SOLUTIONTYPE;
$nvp .= "&RETURNURL=" . $RETURNURL;
$nvp .= "&CANCELURL=" . $CANCELURL;
$nvp .= "&L_PAYMENTREQUEST_0_NAME0=" . $PAYMENTNAME0;
$nvp .= "&L_PAYMENTREQUEST_0_DESC0=" . $PAYMENTDESC0;
$nvp .= "&L_PAYMENTREQUEST_0_AMT0=" . $PAYMENTAMT0;
$nvp .= "&L_PAYMENTREQUEST_0_QTY0=" . $PAYMENTQTY0;
$nvp .= "&PAYMENTREQUEST_0_ITEMAMT=" . $PAYMENTITEMAMT;
$nvp .= "&PAYMENTREQUEST_0_AMT=" . $PAYMENTAMT;
$nvp .= "&PAYMENTREQUEST_0_CURRENCYCODE=" . $CURRENCY;
$nvp .= "&LOCALECODE=" . $LOCALECODE;
$nvp .= "&HDRIMG=" . $HEADERLOGO;
$nvp .= "&PAYFLOWCOLOR=" . 262626;
Upvotes: 2
Views: 3393
Reputation: 19356
PaymentActionNotInitiated
does not refer to PAYMENTREQUEST_0_PAYMENTACTION
.
It merely means that you have not yet direct a buyer to the PayPal page in order to confirm his/her payment.
To recap, this is how Express Checkout works:
Upvotes: 9