pay icon indicating copy to clipboard operation
pay copied to clipboard

Fix to Paddle Billing Payment Method creation

Open deanpcmad opened this issue 4 months ago • 2 comments

This PR fixes a bug found in this discussion: https://github.com/pay-rails/pay/discussions/922#discussioncomment-8191211

It also adds a new method called sync_from_transaction which takes both a pay_customer and a transaction. This then uses the Paddle API to grab the details for that transaction and create/update a Payment Method for the given Pay Customer.

Pay::PaddleBilling::PaymentMethod.sync_from_transaction pay_customer: Customer.last.payment_processor, transaction: "txn_01hmxtm1ep1c2pznfftybn56kk"

deanpcmad avatar Jan 24 '24 14:01 deanpcmad