Support » Plugin: GiveWP - Donation Plugin and Fundraising Platform » Finishing my payment gateway

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Mehul Gohil

    (@mehul0810)

    Hi Peter,

    You can redirect the user to that link which you received from the payment provider. I think that link will be the checkout page link of the payment provider where the user will enter their credit card details and then the payment provider will redirect back to the merchant site with necessary transaction details.

    Once you receive the response that the payment is successful at the payment provider end, then you can send the user to the success page using function give_send_to_success_page().

    Regards,
    Mehul

    Thread Starter pstidsen

    (@pstidsen)

    Hi there,

    Thanks for your reply. I have now forwarded the user til the payment page.

    The payment provider offers an success URL for sending the user back. I have set that to https://domain.com/donation-confirmation/

    However, this does not set the donation status to complete. How do I execute some code in order to mark the donation as completed and maybe also add the transaction details to the donation?

    Plugin Contributor Mehul Gohil

    (@mehul0810)

    Hi Peter,

    You can use the function give_update_payment_status( $donation_id, 'publish' ); to set the status to a specific donation. In this case, ‘publish’, will set the donation to show completed status.

    Regards,
    Mehul

    Thread Starter pstidsen

    (@pstidsen)

    Hi there,

    Thanks for your reply. Is the $donation_id the post ID or the sequential donation ID? Is it possible to find one having the other?

    Best Regards,
    Peter B. Stidsen

    Plugin Contributor Mehul Gohil

    (@mehul0810)

    Hi Peter,

    $donation_id is post ID. To get a sequential ID from donation id, you need to use function Give()->seq_donation_number->get_serial_code( $donation_or_post_id )

    Let me know if you have any other questions.

    Thanks,
    Mehul

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Finishing my payment gateway’ is closed to new replies.