簡體   English   中英

退款+取消訂閱Paypal API

[英]Refund + cancel subscription Paypal API

我雇用了某人來為我編寫一些代碼,以取消Paypal API中的定期付款,如下所示:

function change_subscription_status( $profile_id, $action ) {

   $api_request = 'USER=' . urlencode( 'xxxxxxxxxxxxxxx' )
    .  '&PWD=' . urlencode( 'xxxxxxxxxxxxxxx' )
    .  '&SIGNATURE=' . urlencode( 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' )
    .  '&VERSION=76.0'
    .  '&METHOD=ManageRecurringPaymentsProfileStatus'
    .  '&PROFILEID=' . urlencode( $profile_id )
    .  '&ACTION=' . urlencode( $action )
    .  '&NOTE=' . urlencode( 'Plan cancelled in application' );


$ch = curl_init();
curl_setopt( $ch, CURLOPT_URL, 'https://api-3t.paypal.com/nvp' );

[...]

Paypal API是否有辦法在同一時間還退款X.XX?

基本上,我想取消一個定期交易,例如每月10美元,如果客戶使用該軟件15天,則可以退還5美元。

是的,您只需要按照建立ManageRecurringPaymentsProfileStatus請求的方式來構建RefundTransaction請求,然后在腳本中背靠背運行它們即可。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM