-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CODE REVIEW]Feature/SPRO-48 Support Braintree Payment Extensions #2
base: main
Are you sure you want to change the base?
Conversation
Observer/DataAssignObserver.php
Outdated
$stateData = $paymentInfo->getAdditionalInformation('stateData'); // AssignObserver::STATE_DATA | ||
if (is_array($stateData)) { | ||
$stateData['storePaymentMethod'] = true; // AssignObserver::STORE_PAYMENT_METHOD | ||
$paymentInfo->setAdditionalInformation('stateData', $stateData); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure it is related to Braintree?
$result = $this->getPaymentNonceCommand->execute( | ||
['public_hash' => $publicHash, 'customer_id' => $customerId] | ||
)->get(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to fetch paymentMethodNonce
, we already have it: $paymentMethodToken
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checked; we do need the nonce
$paymentModel->setAdditionalInformation( | ||
DataAssignObserver::PAYMENT_METHOD_NONCE, | ||
$result['paymentMethodNonce'] | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$paymentModel->setAdditionalInformation( | |
DataAssignObserver::PAYMENT_METHOD_NONCE, | |
$result['paymentMethodNonce'] | |
); | |
$paymentModel->setAdditionalInformation(DataAssignObserver::PAYMENT_METHOD_NONCE, $paymentMethodToken); |
composer.json
Outdated
"authors": [ | ||
{ | ||
"name": "SUBSCRIBE PRO INC", | ||
"homepage": "http://www.subscribepro.com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, update to https://www.subscribepro.com
"Swarming\\SubscribeProBraintree\\": "" | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, fix JSON format in the file.
8fbd0e6
to
0db007d
Compare
Remove DataAssignObserver, rework TokenAssigner observer, refine composer.json
0db007d
to
3c01f69
Compare
No description provided.