问题
I'm using Rails and need to make reports about payments. I need to receive information about payments. I can't get how to do it.
I found paypal_permissions gem to get permissions to obtaion personal info. I need more, so I changed it. In function update added TRANSACTION_DETAILS, added get_transaction_details_data merchant.
class MerchantsController < ApplicationController
def update
callback_url = URI.encode(merchants_request_permissions_callback_url)
permissions = 'EXPRESS_CHECKOUT,DIRECT_PAYMENT,ACCESS_BASIC_PERSONAL_DATA,ACCESS_ADVANCED_PERSONAL_DATA,TRANSACTION_DETAILS'
def get_transaction_details_data merchant
access_token = merchant.ppp_access_token
verifier = merchant.ppp_access_token_verifier
::PAYPAL_PERMISSIONS_GATEWAY.get_transaction_details_data(access_token, verifier)
end
end
Is it correct ? How I can receive transaction data and personal data ?
回答1:
Can you try this gem : paypal_adaptive ?
来源:https://stackoverflow.com/questions/11389726/how-to-receive-payment-data-or-user-data-from-paypal-using-paypal-permissions-ge