wish Posted April 1, 2020 Share Posted April 1, 2020 Hi, I'm trying to create custom order page for my site. I manage to : Add order using AddOrder API. create Stripe charge using Stripe genuine API. Add Payment using AddInvoicePayment but I can't add or link payment method for client. I tried using AddPayMethod API, but it gives me error "Unsupported Gateway Type for Storage". require_once("/var/www/www.addme.com/webroot/my_account/init.php"); $postData = array( 'clientid' => '1001400', 'type' => 'RemoteCreditCard', 'card_number' => '4007000000027', 'card_expiry' => '2023', 'responsetype' => 'json', 'gateway_module_name' => 'stripe', 'set_as_default' => '1' ); $results = localAPI('AddPayMethod', $postData); I aware that WHMCS not saving card details anymore for certain payment gateway. My question is, how do I link or add payment method for a client? Thanks 0 Quote Link to comment Share on other sites More sharing options...
wish Posted April 16, 2020 Author Share Posted April 16, 2020 any news about this thread? 0 Quote Link to comment Share on other sites More sharing options...
mfoland Posted September 2, 2020 Share Posted September 2, 2020 I'd like to bump this. The API says it will store Remote Data, which, in the Gateway I have built and works, except recurring payments (reason I'm running into this), but it says Unsupported Gateway Type for Storage. Can anyone from WHMCS pipe in on this? 0 Quote Link to comment Share on other sites More sharing options...
mfoland Posted September 2, 2020 Share Posted September 2, 2020 (edited) On 3/31/2020 at 9:35 PM, wish said: Hi, I'm trying to create custom order page for my site. I manage to : Add order using AddOrder API. create Stripe charge using Stripe genuine API. Add Payment using AddInvoicePayment but I can't add or link payment method for client. I tried using AddPayMethod API, but it gives me error "Unsupported Gateway Type for Storage". require_once("/var/www/www.addme.com/webroot/my_account/init.php"); $postData = array( 'clientid' => '1001400', 'type' => 'RemoteCreditCard', 'card_number' => '4007000000027', 'card_expiry' => '2023', 'responsetype' => 'json', 'gateway_module_name' => 'stripe', 'set_as_default' => '1' ); $results = localAPI('AddPayMethod', $postData); I aware that WHMCS not saving card details anymore for certain payment gateway. My question is, how do I link or add payment method for a client? Thanks One thing sticks out here right off the bat, but I completely understand the error. The Card Expiry works in MMYY not just year. Here's something I've done since my Gateway runs differently... $expYr = $finCardRes["card"]["exp_year"]; $expMo = $finCardRes["card"]["exp_month"]; if ($expMo < '10') {$finExpMo = '0' .$expMo;}else {$finExpMo = $expMo;} $finYr = substr( $expYr, -2); $finExp = $finExpMo.$finYr; Again, I still hope WHMCS can pipe in here. The API I'm working with (Square) has the date as a one number integer for single months 1-9 and 2 digits for 10-12 (reasoning if my if statement). The Year has 4 digits (from the API) so I had to create the substring to take off the first two numbers for the year (eg 20) which leaves you with the last remaining part of the year to fit it in WHMCS's MMYY format. Edited September 2, 2020 by mfoland Forgot to touch up on Code Reason 0 Quote Link to comment Share on other sites More sharing options...
tasgray Posted November 22, 2020 Share Posted November 22, 2020 I'm also facing this issue. The lack of response from WHMCS is so disappointing. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Technical Analyst WHMCS Anwar Posted July 19, 2021 WHMCS Technical Analyst Share Posted July 19, 2021 This is a valid error as mentioned in our AddPayMethod API documentation https://developers.whmcs.com/api-reference/addpaymethod/ Quote Note that some tokenised payment gateways cannot be utilised via the API. For Stripe this will mean you cannot add Stripe cards via API. The reason for this would be, because that would involve the full card details touching your server. Thereby negating the point of remotely hosting the card fields. In the case of Stripe, that would mean, you will need to use the client area interface, so that the remote fields can be loaded from 'stripe.js' 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.