About payment gateway development
-
Hello, we are doing GiveWP integration for our own product. Our product works in WordPress as standard. In the documentation, we could not find a way to hide the donate now button and take the action on our plugin.
So we continued with offsite development. Our plugin listens to a GET parameter in WordPress and manages the process through sessions.
It works seamlessly in visual form and the new API. However, after pressing donate now in legacy, it does not redirect in any way. It returns “success” from an AJAX request but stays where it is.
Below you can see the createPayment method.
public function createPayment(Donation $donation, $gatewayData): RedirectOffsite ? ? { ? ? ? ? $returnUrl = $this->generateSecureGatewayRouteUrl( ? ? ? ? ? ? 'handleCreatePaymentRedirect', ? ? ? ? ? ? $donation->id, ? ? ? ? ? ? [ ? ? ? ? ? ? ? ? 'givewp-donation-id' => $donation->id, ? ? ? ? ? ? ? ? 'givewp-success-url' => urlencode(give_get_success_page_uri()), ? ? ? ? ? ? ] ? ? ? ? ); ? ? ? ? return new RedirectOffsite(Helpers::createSPP([ ? ? ? ? ? ? 'addon' => 'givewp', ? ? ? ? ? ? 'addonName' => 'GiveWP', ? ? ? ? ? ? 'order' => [ ? ? ? ? ? ? ? ? 'id' => $donation->id, ? ? ? ? ? ? ? ? 'amount' => $donation->amount->formatToDecimal(), ? ? ? ? ? ? ? ? 'currency' => give_get_currency($donation->id), ? ? ? ? ? ? ], ? ? ? ? ? ? 'params' => [ ? ? ? ? ? ? ? ? 'returnUrl' => $returnUrl, ? ? ? ? ? ? ], ? ? ? ? ? ? 'type' => Type::LITE ? ? ? ? ])); ? ? }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘About payment gateway development’ is closed to new replies.