Skip to content

Commit 7222e34

Browse files
committed
Set paymentToken when not on a contributionpage
1 parent c6787f4 commit 7222e34

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
@@ -162,6 +162,12 @@ public function doPayment(&$params, $component = 'contribute') {
162162
$this->initialize($params);
163163
$this->saveBillingAddressIfRequired($params);
164164

165+
// "token" only gets set when coming in via a contribution page.
166+
// Otherwise we need to set it from the actual parameter that's set on the form
167+
if (!empty($params['paymentToken']) && empty($params['token'])) {
168+
$params['token'] = $params['paymentToken'];
169+
}
170+
165171
try {
166172
if (!empty($params['token'])) {
167173
$response = $this->doTokenPayment($params);

0 commit comments

Comments
 (0)