Question

I have the following code in my PHP which I guess intiates a PayPal payment:

$resArray = CallPay (   $actionType, $cancelUrl, $returnUrl, $currencyCode, $receiverEmailArray,
                        $receiverAmountArray, $receiverPrimaryArray, $receiverInvoiceIdArray,
                        $feesPayer, $ipnNotificationUrl, $memo, $pin, $preapprovalKey,
                        $reverseAllParallelPaymentsOnError, $senderEmail, $trackingId   );

This seems to generate some payment specific data in $resArray, i.e:

[responseEnvelope.timestamp]        = 2013-09-10T13:23:42.650-07:00 <- actual value
[responseEnvelope.ack]              = Success                       <- actual value
[responseEnvelope.correlationId]    = CORRELATION_ID_HERE           <- value changed for security reasons
[responseEnvelope.build]            = BUILD_VALUE_HERE              <- value changed for security reasons
[payKey]                            = GENERATED_KEY_HERE            <- value changed for security reasons
[paymentExecStatus]                 = CREATED                       <- actual value

I can then use the [payKey] to send the user to the PayPal site to login and make a payment

$cmd = "cmd=_ap-payment&paykey=" . urldecode($resArray["payKey"]);
RedirectToPayPal ( $cmd );

My question is, if the user does not login to finish the payment, is it possible to UNCREATE this record which PayPal has based on the [payKey] or do I not need to UNCREATE it? Does PayPal automatically remove this record if it is not used after a certain amount of time? If that is the case, how long does PayPal keep the record before removing it?

According to https://cms.paypal.com/uk/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_APGettingStarted, it says:

In this particular scenario, the paymentExecStatus variable is set to CREATED instead of COMPLETED, which indicates that the payment has been created, but has not yet been executed.

It doesn't seem to go into further details to say if this can be uncreated, or how long it remains created for before it gets removed (if it gets removed).

Was it helpful?

Solution

There's no way to cancel the pay key once it's created, but it will automatically expire on its own after 3 hours.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top