[#7045] STRIPE SEPA

6 years 2 months ago - 6 years 2 months ago #302252 by krileon
Replied by krileon on topic STRIPE SEPA
SEPA is only available if "Payment Button method" is set to "Inline Form (Elements)" or "Inline Form (Server Side)". There is little reason to set it to anything other than "Inline Form (Elements)", which is the primary payment method the gateway is developed for. The payment types available to "Popup (Checkout)" and "Button (Stripe JS)" payment methods are not controlled by CBSubs and are typically limited to card payments. "Inline Form (Elements)" supports all the available payment methods that Stripe provides as found below.

stripe.com/docs/sources

As for the SEPA mandate it is supported already and displayed just below the payment button. It's a language string you can adjust as needed as well using language key STRIPE_SEPA_NOTICE. Looks like output of the mandate URL is mandatory after accepting the statement, but again since I've no means to test this I've no means of further implementation. It's purely guessing. Using their example request data will see about having the mandate URL output to the confirmation page.

#7046


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

6 years 2 months ago - 6 years 2 months ago #302284 by activha
Replied by activha on topic STRIPE SEPA
Hi
First tests with API 2018-02-06 :

RECURRING PAYMENTS /
Recurring payment with inline form (server side) gives the error Invalid IBAN structure and reloads the payment page without payment.
Recurring payment with inline form (elements) gives the error : Missing required source parameter : sepa_debit[iban] and reload payment page without payment
For both tests we used Stripe recommended test Iban for successful transactions : DE89370400440532013000

For more info the notification log is :
FAILED
Données brutes 	$response="{
  "error": {
    "type": "invalid_request_error",
    "message": "Missing required param: customer.",
    "param": "customer"
  }
}
"
$results=array (
  'error' =>
  array (
    'type' => 'invalid_request_error',
    'message' => 'Missing required param: customer.',
    'param' => 'customer',
  ),
);
$return=array (
  'level' => 'fatal',
  'errorText' => 'Missing required param: customer.. Veuillez contacter l\'administrateur du site pour vérifier les logs d\'erreur.',
  'errorCode' => 400,
);
$request=array (
  'currency' => 'eur',
  'statement_descriptor' => 'ACTIV HA Negopack N3 avec paiement mensuel pour Activ\'H.A - Jean',
  'owner[name]' => 'Jean',
  'owner[email]' => 'myemail@me.com',
  'owner[address][city]' => 'Chapt',
  'owner[address][country]' => 'FR',
  'owner[address][line1]' => '6 rue Jules',
  'owner[address][postal_code]' => '69630',
  'owner[address][state]' => 'ne',
  'metadata[order_id]' => 5283,
  'type' => 'sepa_debit',
  'sepa_debit[iban]' => '89370400440532013000',
);

ONE SHOT PAYMENT /
It seems like one shot payment with Stripe sepa worked well with inline form (elements)
We got the returning following errors though on the returned payment page :

Error : Invalid IBAN structure. Veuillez contacter l'administrateur du site pour vérifier les logs d'erreur.
Error : Received unknown parameters: currency, statement_descriptor, owner, type, sepa_debit. Veuillez contacter l'administrateur du site pour vérifier les logs d'erreur.

It also seems like payment succeeded but is recorded as a Visa payment in Stripe Dashboard and not a SEPA one.
In CBsubs the notification correctly recorded as return : web_type /sepa

The notification log is :
SUCCESS
Données brutes 	$response="{
  "id": "ch_1ByeEuDq739h3iODQqq66a9v",
  "object": "charge",
  "amount": 18000,
  "amount_refunded": 0,
  "application": null,
  "application_fee": null,
  "balance_transaction": "txn_1ByeEuDq739h3iODyQpFOC3g",
  "captured": true,
  "created": 1519383440,
  "currency": "eur",
  "customer": "cus_CKnpue29oakIxo",
  "description": "ACTIV HA Frais et pénalités pour retard de paiement pour Activ'H.A - Jean",
  "destination": null,
  "dispute": null,
  "failure_code": null,
  "failure_message": null,
  "fraud_details": {},
  "invoice": null,
  "livemode": false,
  "metadata": {
    "user_id": "57",
    "order_id": "5284",
    "invoice": "ACTIVHA-U-331"
  },
  "on_behalf_of": null,
  "order": null,
  "outcome": {
    "network_status": "approved_by_network",
    "reason": null,
    "risk_level": "normal",
    "seller_message": "Payment complete.",
    "type": "authorized"
  },
  "paid": true,
  "receipt_email": "myemail@me.com",
  "receipt_number": null,
  "refunded": false,
  "refunds": {
    "object": "list",
    "data": [],
    "has_more": false,
    "total_count": 0,
    "url": "/v1/charges/ch_1ByeEuDq739h3iODQqq66a9v/refunds"
  },
  "review": null,
  "shipping": null,
  "source": {
    "id": "card_1ByGpWDq739h3iODZN7Ciy2f",
    "object": "card",
    "address_city": null,
    "address_country": null,
    "address_line1": null,
    "address_line1_check": null,
    "address_line2": null,
    "address_state": null,
    "address_zip": null,
    "address_zip_check": null,
    "brand": "Visa",
    "country": "US",
    "customer": "cus_CKnpue29oakIxo",
    "cvc_check": null,
    "dynamic_last4": null,
    "exp_month": 2,
    "exp_year": 2020,
    "fingerprint": "Y9llor3Ru8tOVDjo",
    "funding": "credit",
    "last4": "4242",
    "metadata": {},
    "name": "myemail@me.com",
    "tokenization_method": null
  },
  "source_transfer": null,
  "statement_descriptor": null,
  "status": "succeeded",
  "transfer_group": null
}
"
$results=array (
  'id' => 'ch_1ByeEuDq739h3iODQqq66a9v',
  'object' => 'charge',
  'amount' => 18000,
  'amount_refunded' => 0,
  'application' => NULL,
  'application_fee' => NULL,
  'balance_transaction' => 'txn_1ByeEuDq739h3iODyQpFOC3g',
  'captured' => true,
  'created' => 1519383440,
  'currency' => 'eur',
  'customer' => 'cus_CKnpue29oakIxo',
  'description' => 'ACTIV HA Frais et pénalités pour retard de paiement pour Activ\'H.A - Jean',
  'destination' => NULL,
  'dispute' => NULL,
  'failure_code' => NULL,
  'failure_message' => NULL,
  'fraud_details' =>
  array (
  ),
  'invoice' => NULL,
  'livemode' => false,
  'metadata' =>
  array (
    'user_id' => '57',
    'order_id' => '5284',
    'invoice' => 'ACTIVHA-U-331',
  ),
  'on_behalf_of' => NULL,
  'order' => NULL,
  'outcome' =>
  array (
    'network_status' => 'approved_by_network',
    'reason' => NULL,
    'risk_level' => 'normal',
    'seller_message' => 'Payment complete.',
    'type' => 'authorized',
  ),
  'paid' => true,
  'receipt_email' => 'myemail@me.com',
  'receipt_number' => NULL,
  'refunded' => false,
  'refunds' =>
  array (
    'object' => 'list',
    'data' =>
    array (
    ),
    'has_more' => false,
    'total_count' => 0,
    'url' => '/v1/charges/ch_1ByeEuDq739h3iODQqq66a9v/refunds',
  ),
  'review' => NULL,
  'shipping' => NULL,
  'source' =>
  array (
    'id' => 'card_1ByGpWDq739h3iODZN7Ciy2f',
    'object' => 'card',
    'address_city' => NULL,
    'address_country' => NULL,
    'address_line1' => NULL,
    'address_line1_check' => NULL,
    'address_line2' => NULL,
    'address_state' => NULL,
    'address_zip' => NULL,
    'address_zip_check' => NULL,
    'brand' => 'Visa',
    'country' => 'US',
    'customer' => 'cus_CKnpue29oakIxo',
    'cvc_check' => NULL,
    'dynamic_last4' => NULL,
    'exp_month' => 2,
    'exp_year' => 2020,
    'fingerprint' => 'Y9llor3Ru8tOVDjo',
    'funding' => 'credit',
    'last4' => '4242',
    'metadata' =>
    array (
    ),
    'name' => 'myemail@me.com',
    'tokenization_method' => NULL,
  ),
  'source_transfer' => NULL,
  'statement_descriptor' => NULL,
  'status' => 'succeeded',
  'transfer_group' => NULL,
);
$return='ch_1ByeEuDq739h3iODQqq66a9v';
$request=array (
  'amount' => 18000.0,
  'currency' => 'eur',
  'description' => 'ACTIV HA Frais et pénalités pour retard de paiement pour Activ\'H.A - Jean',
  'receipt_email' => 'myemail@me.com',
  'metadata[user_id]' => 57,
  'metadata[order_id]' => 5284,
  'metadata[invoice]' => 'ACTIVHA-U-331',
  'customer' => 'cus_CKnpue29oakIxo',
);

Hope it'll help you
Regards
Jean

Please Log in to join the conversation.

6 years 2 months ago #302286 by krileon
Replied by krileon on topic STRIPE SEPA
Your first test has the IBAN missing the first 2 characters DE. It also shouldn't have logged the IBAN to begin with for security purposes so that also needs fixed. If possible please PM super administrator login credentials for a clone of your site where the gateway is setup and will attempt to debug from there as I think that'd go a lot quicker getting all this fixed.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

6 years 2 months ago #302287 by activha
Replied by activha on topic STRIPE SEPA
No we did not miss the DE when inputing the test IBAN, but yes they are not on the returning notification.

We only have a live server, everything test is local and have no access to internet. Can you check on the live one ? And have a look at the Mailer at the same time ?

Please Log in to join the conversation.

6 years 2 months ago #302289 by krileon
Replied by krileon on topic STRIPE SEPA

Can you check on the live one ?

Test builds of the gateway will be installed and debug information will be output. If that's not a problem then I can check there, but be sure to make a full backup. Really recommended to make a clone of the site where the issue is present so I can investigate without risk to your live site.

And have a look at the Mailer at the same time ?

My priority is fixing SEPA. I've informed Beat of the mailer issue.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

6 years 2 months ago - 6 years 2 months ago #302290 by krileon
Replied by krileon on topic STRIPE SEPA
I think I see what's happening with the error. It's trying to update the customer object with the SEPA payment source, but customer objects can only have a credit card or source token as their default source. Just need to be sure it skips that step for SEPA, but will need to make some changes for single payments to skip using customer id in this case.

This however shouldn't even be happening as normally it's operating entirely from a source token. Ensure "Payment Button method" is set to "Inline Form (Elements)" and do not change it unless you understand the usage needs of the other methods completely (in most cases you will never use those other methods).

Edit: Ok, the process doesn't need to be skipped. Server side source generation isn't properly populating the request parameters with just the source id. Fixing this and then server side SEPA should work, but again elements should be used instead of server side. It is more secure to use elements as it does not post raw data like credit card numbers to your own server.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.226 seconds

Facebook Twitter LinkedIn