This repository was archived by the owner on Jun 2, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +62
-2
lines changed
Expand file tree Collapse file tree 5 files changed +62
-2
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Pmclain \OneClickCheckout \Model \VaultSource ;
4+
5+ use Pmclain \OneClickCheckout \Api \VaultSourceInterface ;
6+ use Magento \Vault \Api \Data \PaymentTokenInterface ;
7+
8+ class PmclainAuthorizenetCim implements VaultSourceInterface
9+ {
10+ /**
11+ * @param PaymentTokenInterface $token
12+ * @return array
13+ */
14+ public function getPaymentData ($ token )
15+ {
16+ return [
17+ 'additional_data ' => [
18+ PaymentTokenInterface::PUBLIC_HASH => $ token ->getPublicHash (),
19+ ],
20+ 'method ' => 'pmclain_authorizenetcim_vault ' ,
21+ ];
22+ }
23+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Pmclain \OneClickCheckout \Model \VaultSource ;
4+
5+ use Pmclain \OneClickCheckout \Api \VaultSourceInterface ;
6+ use Magento \Vault \Api \Data \PaymentTokenInterface ;
7+
8+ class PmclainStripe implements VaultSourceInterface
9+ {
10+ /**
11+ * @param PaymentTokenInterface $token
12+ * @return array
13+ */
14+ public function getPaymentData ($ token )
15+ {
16+ return [
17+ 'additional_data ' => [
18+ PaymentTokenInterface::PUBLIC_HASH => $ token ->getPublicHash (),
19+ ],
20+ 'method ' => 'pmclain_stripe_vault ' ,
21+ ];
22+ }
23+ }
Original file line number Diff line number Diff line change @@ -28,8 +28,10 @@ customers without a default payment. The last stored payment method for is set
2828as default.
2929
3030### Compatibility
31- It is compatible with Braintree out of the box. Configuration can be added for
32- any payment method using the Magento Vault module for storing gateway tokens.
31+ ** Compatible Payment Modules**
32+ * Magento_Braintree (included with Magento)
33+ * [ Pmclain_Stripe] ( https://github.com/pmclain/module-stripe )
34+ * [ Pmclain_AuthorizenetCim] ( https://github.com/pmclain/module-authorizenetcim )
3335
3436*** Adding a new Vault Payment Provider***
35371 . Create class implementing ` Pmclain\OneClickCheckout\Api\VaultSourceInterface ` . The
Original file line number Diff line number Diff line change 77 <arguments >
88 <argument name =" vaultSourceMap" xsi : type =" array" >
99 <item name =" braintree" xsi : type =" object" >Pmclain\OneClickCheckout\Model\VaultSource\Braintree</item >
10+ <item name =" pmclain_authorizenetcim" xsi : type =" object" >Pmclain\OneClickCheckout\Model\VaultSource\PmclainAuthorizenetCim</item >
11+ <item name =" pmclain_stripe" xsi : type =" object" >Pmclain\OneClickCheckout\Model\VaultSource\PmclainStripe</item >
1012 </argument >
1113 </arguments >
1214 </type >
Original file line number Diff line number Diff line change 66 <argument name =" template" xsi : type =" string" >Pmclain_OneClickCheckout::customer_account/credit_card.phtml</argument >
77 </action >
88 </referenceBlock >
9+ <referenceBlock name =" pmclainauthorizenetcim.card.renderer" >
10+ <action method =" setTemplate" >
11+ <argument name =" template" xsi : type =" string" >Pmclain_OneClickCheckout::customer_account/credit_card.phtml</argument >
12+ </action >
13+ </referenceBlock >
14+ <referenceBlock name =" stripe.card.renderer" >
15+ <action method =" setTemplate" >
16+ <argument name =" template" xsi : type =" string" >Pmclain_OneClickCheckout::customer_account/credit_card.phtml</argument >
17+ </action >
18+ </referenceBlock >
919 </body >
1020</page >
You can’t perform that action at this time.
0 commit comments