• Resolved BeycanPress LLC

    (@beycanpress)


    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)
  • Thread Starter BeycanPress LLC

    (@beycanpress)

    I have tried many things but the page it is on also loads the redirected page. Is there a hook that can control the donate now button? We can disable the current process and open our payment modal first and submit the form after the payment is completed (backend control will be done in createPayment).

    Here is repo, you can check it.

    https://github.com/BeycanPress/givewp-cryptopay-gateway

    Plugin Support Matheus Martins

    (@matheusfd)

    Hi, @beycanpress.

    Glad you reached out.

    When your doubt is related to custom development and not support itself, we’ve got a spot where you can ask this question directly to our development team,?but the question will need to be more fleshed out there than it is here. I’d recommend passing along the exact code snippet you are attempting to use and what results from that snippet. The more focused the question is, the more likely our development team will be able to step away from their busy schedules to help with this sort of custom code.

    You can reach out to them here:?https://github.com/impress-org/givewp/discussions.

    Thanks for using GiveWP! Have a great day.

    Thread Starter BeycanPress LLC

    (@beycanpress)

    Thanks for your reply, I’ve created a topic there. Actually I’m almost done, there’s just a routing problem with the old structure. I sent you an email so that you can list it in your plugin lists, but I’m not getting a response.

    I guess in general Stellar WP doesn’t want to list external resources :D. Because I developed an integration in LearnDash, I could get a response before, but they don’t respond to mail to add to add-ons lists.

    This is strange ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘About payment gateway development’ is closed to new replies.