我正在使用Django paypalrestsdk for PayPal https://github.com/paypal/PayPal-Python-SDK
我想设置一个月度订阅计划.每个月初,买家将收取100美元的费用.
这是我制作的结算方案代码:
billing_plan = paypalrestsdk.BillingPlan({
"name": "Monthly Billing Plan",
"description": "Monthly Plan",
"merchant_preferences": {
"auto_bill_amount": "yes",
"cancel_url": "http://localhost:8000/payment_billing_agreement_cancel",
"initial_fail_amount_action": "continue",
"max_fail_attempts": "0",
"return_url": "http://localhost:8000/payment_billing_agreement_execute",
"setup_fee": {
"currency": "USD",
"value": "100"
}
},
"payment_definitions": [
{
"amount": {
"currency": "USD",
"value": "100"
},
"cycles": "0",
"frequency": "MONTH",
"frequency_interval": "1",
"name": "Monthly Payment",
"type": "REGULAR"
}
],
"type": "INFINITE"
})
Run Code Online (Sandbox Code Playgroud)
我不清楚它是在月的第一天还是在月的最后一天收费?我应该进行设置,以便立即收费吗?我的意图是收费是在每个月的第一天完成的.
我在买家的沙箱中看到这个:预先批准的付款USD100这是什么意思,他已经收取100美元或预先批准并在当月的最后一天收费?
基于此,它似乎立即收费.这意味着它应该显示200美元吗?(设置+每月但仅显示100美元) https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/subscription_billing_cycles/
到目前为止我用过这个流程:
create billing plan
activate billing plan
create billing agreement
execute billing agreement …Run Code Online (Sandbox Code Playgroud) 当我将PayPal与我的沙盒测试帐户集成时,我通过DoExpressCheckoutPaymentAPI调用或PayPal的新/executeREST调用创建的所有事务都处于待处理状态,我必须手动接受它们,否则我必须等待3-5天.为什么?