Skip to content

Commit 4f1dd93

Browse files
committed
Set paymentToken when not on a contributionpage
1 parent 27d5695 commit 4f1dd93

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CRM/Core/Payment/OmnipayMultiProcessor.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,12 @@ public function doPayment(&$params, $component = 'contribute') {
131131
$this->initialize($params);
132132
$this->saveBillingAddressIfRequired($params);
133133

134+
// "token" only gets set when coming in via a contribution page.
135+
// Otherwise we need to set it from the actual parameter that's set on the form
136+
if (!empty($params['paymentToken']) && empty($params['token'])) {
137+
$params['token'] = $params['paymentToken'];
138+
}
139+
134140
try {
135141
if (!empty($params['token'])) {
136142
$response = $this->doTokenPayment($params);

0 commit comments

Comments
 (0)