paypal-recurring gem を使用して、定期的なプロファイルの全額返金を求めるにはどうすればよいですか? アプリケーションの開発に Ruby on Rails を使用しています。検索してみましたが、問題に対する適切な答えが見つかりませんでした。
私はこのリンクを見つけました:
https://www.x.com/developers/paypal/documentation-tools/api/refundtransaction-api-operation-soap
しかし、それを自分のアプリに統合する方法がわかりません。
私はこの宝石を使っています。
https://github.com/fnando/paypal-recurring
私のコードは次のとおりです。
def refund_full_paypal_transaction
PayPal::Recurring.new({
:profile_id => "customers profile id",
:transaction_id => "to_be_refunded transaction_id",
:reference => "12345",
:refund_type => :full,
:amount => "whatever amount",
:currency => "USD"
})
end