File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
app/code/Magento/PaypalGraphQl/Observer Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 8
8
9
9
namespace Magento \PaypalGraphQl \Observer ;
10
10
11
+ use Magento \Customer \Model \Session as CustomerModelSession ;
11
12
use Magento \Framework \App \Config \ScopeConfigInterface ;
12
13
use Magento \Framework \Event \Observer ;
13
14
use Magento \Framework \GraphQl \Exception \GraphQlInputException ;
14
15
use Magento \Payment \Observer \AbstractDataAssignObserver ;
15
16
use Magento \Quote \Api \Data \PaymentInterface ;
16
- use Magento \Customer \Model \Session as CustomerModelSession ;
17
17
18
18
/**
19
19
* Class PayflowProSetCcData set CcData to quote payment
@@ -80,9 +80,11 @@ public function execute(Observer $observer)
80
80
$ paymentModel ->setData (self ::IS_ACTIVE_PAYMENT_TOKEN_ENABLER , false );
81
81
}
82
82
83
- foreach ($ additionalData ['cc_details ' ] as $ ccKey => $ ccValue ) {
84
- $ paymentModel ->setData ($ ccKey , $ ccValue );
85
- }
83
+ $ ccData = $ additionalData ['cc_details ' ];
84
+ $ paymentModel ->setCcType ($ ccData ['cc_type ' ]);
85
+ $ paymentModel ->setCcExpYear ($ ccData ['cc_exp_year ' ]);
86
+ $ paymentModel ->setCcExpMonth ($ ccData ['cc_exp_month ' ]);
87
+ $ paymentModel ->setCcLast4 ($ ccData ['cc_last_4 ' ]);
86
88
}
87
89
88
90
/**
You can’t perform that action at this time.
0 commit comments