souzadavi Posted May 16, 2018 Share Posted May 16, 2018 Hello, I'm trying to create a payment module with credit card, is almost done, I only have a doubts about the validation of payment, I need to do it on method capture or create a callback for that module? Also sometimes the credit card has another return, analyzing, or waiting, i tried to setup other status without success. Sometime the credit card need sometime to confirm the payment, so how do I setup it on capture method or callback file? Also the documentation at: https://developers.whmcs.com/payment-gateways/merchant-gateway/ show return array( 'status' => ($data->success == 1) ? 'success' : 'declined', 'rawdata' => $data, 'transid' => $data->transaction_id, 'fees' => $data->fees, ); thanks 0 Quote Link to comment Share on other sites More sharing options...
souzadavi Posted May 17, 2018 Author Share Posted May 17, 2018 The answer of the whmcs support: John KiplingStaff Merchant gateways can leverage a callback file to handle out-of-sequence payments. You can use the callback file per the example in the gateway module: https://github.com/WHMCS/sample-gateway-module/blob/master/modules/gateways/callback/gatewaymodule.php You'd just need to pass the URL to the callback file to your payment gateway in the _capture function, so that it knows to send the payment details to the callback file when required. Related documentation: https://developers.whmcs.com/payment-gateways/callbacks/ In the instances when payment is held for manual review, you might like to add a message to the invoice letting the customer know that payment has been processed but is pending review. This can be done by redirecting the client to the following URL after payment:.$CONFIG["SystemURL"].'/viewinvoice.php?id='.$invoiceid.'&pendingreview=true" 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.