souzadavi Posted September 1, 2019 Share Posted September 1, 2019 At example: https://github.com/WHMCS/developer-docs/blob/master/payment-gateways/tokenised-remote-storage.md on case DELETE there is a CURL for api delete. But at documentation there is no information about it. Please could explain about this new DELETE function: The DOCS should be update to help the adjustment for new version 7.8 of WHMCS. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Technical Analyst WHMCS Edward Posted September 1, 2019 WHMCS Technical Analyst Share Posted September 1, 2019 The code you're quoting is a sample of the API call you might would make to your payment gateway providers' tokenisation API. In reality it would need to be your payment gateway API endpoint that you would use in place of the https://www.example.com/api/delete URL - not something within the WHMCS API. -Ed 0 Quote Link to comment Share on other sites More sharing options...
souzadavi Posted September 1, 2019 Author Share Posted September 1, 2019 But I need to pass to whmcs which credit card a need to delete, before was easy because was only one... Now, how I know which credit card I should delete in whmcs? So how do I delete a credit card token when user request? Thanks to write back. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Technical Analyst WHMCS Edward Posted September 2, 2019 WHMCS Technical Analyst Share Posted September 2, 2019 The WHMCS UI will call your custom payment gateway module and pass in the details of the credit card/pay method that has been requested for deletion via the UI. If your payment module returns that the deletion was successful, WHMCS will automatically delete the appropriate payment method. You do not need to do this within your module. If you are doing something different and need to use the API then the following new API methods have been made available for working with Pay Methods: https://developers.whmcs.com/api-reference/getpaymethods/https://developers.whmcs.com/api-reference/addpaymethod/https://developers.whmcs.com/api-reference/updatepaymethod/https://developers.whmcs.com/api-reference/deletepaymethod/ -Ed 1 Quote Link to comment Share on other sites More sharing options...
souzadavi Posted September 2, 2019 Author Share Posted September 2, 2019 In the URL: https://github.com/WHMCS/developer-docs/blob/master/payment-gateways/tokenised-remote-storage.md The action parameter is "delete", but in WHMCS 7.7 version my module remove credit card with action "clear" like this: if($_POST['remove'] == 1 && $_GET['action'] != "clear"){ return array( "status" => "success", "gatewayid" => NULL, "rawdata" => "Cartão Removido",); } My new one after read the manual: case 'delete': return [ 'status' => 'success', "rawdata" => "Cartão Removido: ". $gatewayid, ]; break; Both is it right? action clear ou delete will do the job? The gatewayid do not need to send? it's been really hard to deploy credit card module, because it working only in production Thanks 0 Quote Link to comment Share on other sites More sharing options...
souzadavi Posted September 11, 2019 Author Share Posted September 11, 2019 The example here: https://github.com/WHMCS/sample-merchant-gateway/blob/master/modules/gateways/merchantgateway.php work perfect! I did like there and the things work... thanks! 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.