File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
app/code/Magento/Paypal/view/frontend/web/js/action Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -18,19 +18,22 @@ define(
18
18
return function ( messageContainer ) {
19
19
var serviceUrl ,
20
20
payload ,
21
+ method = 'put' ,
21
22
paymentData = quote . paymentMethod ( ) ;
22
23
23
24
/**
24
25
* Checkout for guest and registered customer.
25
26
*/
26
27
if ( ! customer . isLoggedIn ( ) ) {
27
- serviceUrl = urlBuilder . createUrl ( '/guest-carts/:cartId/selected -payment-method ' , {
28
+ serviceUrl = urlBuilder . createUrl ( '/guest-carts/:cartId/set -payment-information ' , {
28
29
cartId : quote . getQuoteId ( )
29
30
} ) ;
30
31
payload = {
31
32
cartId : quote . getQuoteId ( ) ,
32
- method : paymentData
33
+ email : quote . guestEmail ,
34
+ paymentMethod : paymentData
33
35
} ;
36
+ method = 'post' ;
34
37
} else {
35
38
serviceUrl = urlBuilder . createUrl ( '/carts/mine/selected-payment-method' , { } ) ;
36
39
payload = {
@@ -40,7 +43,7 @@ define(
40
43
}
41
44
fullScreenLoader . startLoader ( ) ;
42
45
43
- return storage . put (
46
+ return storage [ method ] (
44
47
serviceUrl , JSON . stringify ( payload )
45
48
) . fail (
46
49
function ( response ) {
You can’t perform that action at this time.
0 commit comments