mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-08 21:52:55 +08:00
Add react testing library
This commit is contained in:
parent
7fd0d2e431
commit
b68e0a6eb5
4 changed files with 84 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
const config = wc.wcSettings.getSetting('ppcp-credit-card-gateway_data');
|
||||
|
||||
export async function createOrder() {
|
||||
const config = wc.wcSettings.getSetting('ppcp-credit-card-gateway_data');
|
||||
|
||||
return fetch(config.scriptData.ajax.create_order.endpoint, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
|
@ -23,6 +23,8 @@ export async function createOrder() {
|
|||
}
|
||||
|
||||
export async function onApprove(data) {
|
||||
const config = wc.wcSettings.getSetting('ppcp-credit-card-gateway_data');
|
||||
|
||||
return fetch(config.scriptData.ajax.approve_order.endpoint, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue