我正在使用react-paypal-express-checkout并尝试在信息中心设置返回网址,但这不起作用。我可以收钱,但它不会让我回到正确的页面。
您能告诉我如何将其添加到react-paypal-express-checkout代码中吗?
import React, { Component } from 'react';
import PaypalExpressBtn from 'react-paypal-express-checkout'
export default class PaypalButton extends React.Component {
render() {
const onSuccess = (payment) => { }
const onCancel = (data) => { }
const onError = (err) => { }
let env = 'production';
let currency = 'GBP';
let total = 20
const client = {
sandbox: 'YOUR-SANDBOX-APP-ID',
production: 'YOUR-PROD-APP-ID',
}
return (<PaypalExpressBtn env={env} client={client} currency={currency} total={total} onError={onError} onSuccess={onSuccess} onCancel={onCancel} />)
}
}
&#13;
答案 0 :(得分:0)
使用此代码可以防止将来有人想要它。
library(dplyr)
dat <- readr::read_table(
"sq_id ageclass sex cohort year age grid trialnumber trialdate trialtime
6244 A F 2000 2005 5 AG 1 05/24/05 0:00
10212 A M 2006 2008 2 KL 1 05/04/08 6:13
10212 A M 2006 2010 4 KL 4 05/20/10 6:12
10212 A M 2006 2009 3 KL 2 06/10/09 6:14
10212 A M 2006 2009 3 KL 3 07/01/09 6:15
23052 J F 2017 2017 0 SU 2 08/02/17 11:00
23052 J F 2017 2017 0 SU 1 07/20/17 10:51
23080 J M 2017 2017 0 KL 2 07/29/17 10:20
23080 J M 2017 2017 0 KL 1 07/07/17 8:35")
glimpse(dat)
# Observations: 9
# Variables: 9
# $ sq_id <int> 6244, 10212, 10212, 10212, 10212, 23052, 23052, 23080, 23080
# $ ageclass <chr> "A", "A", "A", "A", "A", "J", "J", "J", "J"
# $ sex <chr> "F", "M", "M", "M", "M", "F", "F", "M", "M"
# $ `cohort year` <chr> "2000 2005", "2006 2008", "2006 2010", "2006 2009", "2006 2009", "2017 2017", "2017 2017",...
# $ age <int> 5, 2, 4, 3, 3, 0, 0, 0, 0
# $ grid <chr> "AG", "KL", "KL", "KL", "KL", "SU", "SU", "KL", "KL"
# $ trialnumber <int> 1, 1, 4, 2, 3, 2, 1, 2, 1
# $ trialdate <chr> "05/24/05", "05/04/08", "05/20/10", "06/10/09", "07/01/09", "08/02/17", "07/20/17", "07/29...
# $ trialtime <time> 00:00:00, 06:13:00, 06:12:00, 06:14:00, 06:15:00, 11:00:00, 10:51:00, 10:20:00, 08:35:00