mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 16:24:33 +08:00
PCP-13 // add payer information to mini-cart, cart and single product
This commit is contained in:
parent
05aac334e7
commit
a9e0cc0cf7
9 changed files with 77 additions and 29 deletions
|
@ -1,4 +1,5 @@
|
|||
import onApprove from './onApproveForContinue.js';
|
||||
import {payerData} from "./Payer";
|
||||
|
||||
class CartActionHandler {
|
||||
|
||||
|
@ -9,11 +10,13 @@ class CartActionHandler {
|
|||
|
||||
configuration() {
|
||||
const createOrder = (data, actions) => {
|
||||
const payer = payerData();
|
||||
return fetch(this.config.ajax.create_order.endpoint, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({
|
||||
nonce: this.config.ajax.create_order.nonce,
|
||||
purchase_units: [],
|
||||
payer
|
||||
}),
|
||||
}).then(function(res) {
|
||||
return res.json();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue