Debug sepa payment
This commit is contained in:
parent
9b1a01bbd6
commit
eabf01a422
@ -114,11 +114,7 @@ if (empty($reshook)) {
|
||||
}
|
||||
$paymentservice = GETPOST('paymentservice');
|
||||
|
||||
if (preg_match('/stripesepa/', $paymentservice)) {
|
||||
$result = $object->demande_prelevement_stripe($user, price2num(GETPOST('withdraw_request_amount', 'alpha')), $newtype, $sourcetype);
|
||||
} else {
|
||||
$result = $object->demande_prelevement($user, price2num(GETPOST('withdraw_request_amount', 'alpha')), $newtype, $sourcetype);
|
||||
}
|
||||
$result = $object->demande_prelevement($user, price2num(GETPOST('withdraw_request_amount', 'alpha')), $newtype, $sourcetype);
|
||||
|
||||
if ($result > 0) {
|
||||
$db->commit();
|
||||
@ -142,6 +138,14 @@ if (empty($reshook)) {
|
||||
}
|
||||
}
|
||||
|
||||
// Payment with Direct Debit Stripe
|
||||
if ($action == 'sepastripepayment' && $usercancreate) {
|
||||
$result = $object->makeStripeSepaRequest($user, GETPOST('did', 'int'), 'direct-debit', 'facture');
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// payments conditions
|
||||
if ($action == 'setconditions' && $usercancreate) {
|
||||
$object->fetch($id);
|
||||
@ -871,7 +875,8 @@ if ($object->id > 0) {
|
||||
|
||||
print '<td>';
|
||||
if (!empty($conf->global->STRIPE_SEPA_DIRECT_DEBIT)) {
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=new&paymentservice=stripesepa&token='.newToken().'&did='.$obj->rowid.'&id='.$object->id.'&type='.urlencode($type).'">'.img_picto('', 'stripe', 'class="pictofixedwidth"').$langs->trans("SendToStripe").'</a>';
|
||||
$langs->load("stripe");
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=sepastripepayment&paymentservice=stripesepa&token='.newToken().'&did='.$obj->rowid.'&id='.$object->id.'&type='.urlencode($type).'">'.img_picto('', 'stripe', 'class="pictofixedwidth"').$langs->trans("RequestDirectDebitWithStripe").'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -70,4 +70,5 @@ ToOfferALinkForLiveWebhook=Link to setup Stripe WebHook to call the IPN (live mo
|
||||
PaymentWillBeRecordedForNextPeriod=Payment will be recorded for the next period.
|
||||
ClickHereToTryAgain=<a href="%s">Click here to try again...</a>
|
||||
CreationOfPaymentModeMustBeDoneFromStripeInterface=Due to Strong Customer Authentication rules, creation of a card must be done from Stripe backoffice. You can click here to switch on Stripe customer record: %s
|
||||
TERMINAL_LOCATION=Location (address) for terminals
|
||||
TERMINAL_LOCATION=Location (address) for terminals
|
||||
RequestDirectDebitWithStripe=Request Direct Debit with Stripe
|
||||
Loading…
Reference in New Issue
Block a user