app/models/workarea/payment/authorize/afterpay.rb in workarea-afterpay-2.1.0 vs app/models/workarea/payment/authorize/afterpay.rb in workarea-afterpay-2.1.1
- old
+ new
@@ -6,10 +6,10 @@
include CreditCardOperation
include AfterpayPaymentGateway
def complete!
response = authorize
- if response.success?
+ if response.success? && response.body['status'] == 'APPROVED'
transaction.response = ActiveMerchant::Billing::Response.new(
true,
I18n.t(
'workarea.afterpay.authorize',
amount: transaction.amount