Skip to content

Commit dc12553

Browse files
committed
Set paymentToken when not on a contributionpage
1 parent 93ec50a commit dc12553

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
@@ -138,6 +138,12 @@ public function doPayment(&$params, $component = 'contribute') {
138138
$this->initialize($params);
139139
$this->saveBillingAddressIfRequired($params);
140140

141+
// "token" only gets set when coming in via a contribution page.
142+
// Otherwise we need to set it from the actual parameter that's set on the form
143+
if (!empty($params['paymentToken']) && empty($params['token'])) {
144+
$params['token'] = $params['paymentToken'];
145+
}
146+
141147
try {
142148
if (!empty($params['token'])) {
143149
$response = $this->doTokenPayment($params);

0 commit comments

Comments
 (0)