function webform_civicrm_civicrm_alterPaymentProcessorParams in Webform CiviCRM Integration 7.5
Same name and namespace in other branches
- 7.4 webform_civicrm.module \webform_civicrm_civicrm_alterPaymentProcessorParams()
Implements hook_civicrm_alterPaymentProcessorParams().
Legacy handling for paypal. We use it to override the return url so that the user gets redirected to the right place from paypal.
Required by (at least) 'Paypal - Website Payments Standard' and 'Redsys'
File
- ./
webform_civicrm.module, line 1088 - Webform CiviCRM Integration Module: Links webform submissions to contacts in a CiviCRM database. @author Coleman Watts
Code
function webform_civicrm_civicrm_alterPaymentProcessorParams($paymentObj, $rawParams, &$cookedParams) {
if (!empty($rawParams['webform_redirect_cancel']) && !empty($rawParams['webform_redirect_success']) && !empty($cookedParams['return']) && !empty($cookedParams['cancel_return'])) {
$cookedParams['return'] = $rawParams['webform_redirect_success'];
$cookedParams['cancel_return'] = $rawParams['webform_redirect_cancel'];
}
}