Custom data with PayPal Standard #6690
Unanswered
Genevieve-K
asked this question in
Developer Q&A
Replies: 1 comment 2 replies
-
Hey @Genevieve-K You are correct, gateways have the ability to use the Can you help me understand what exactly you need to do after payment validation? What data do you need and what do you need to do with that data? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi. I have a problem when the donor uses PayPal Standard. For my cart, I need some data after payment validation, I store these data in $_REQUEST. For PayPal Standard, when the confirmation page is displayed after the payment, the initial $_REQUEST is not saved.
I see that a $_REQUEST is constructed in the
generateSecureGatewayRouteUrl(string $gatewayMethod, int $donationId, array $args = [])
function, in file PaymentGateway.php. I think I could add data in this $_REQUEST with the filterhandleCreatePayment(Donation $donation)
:$gatewayData = apply_filters( "givewp_new_payment_{$donation->gatewayId}_gateway_data", null, $donation );
$gatewayData is passed as an argument to the
createPayment()
function. But in file PayPalStandard.php, increatePayment()
, this variable $gatewayData is not added to $args.Could you add it?
Beta Was this translation helpful? Give feedback.
All reactions