Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-Currency Subscription Renewals are Failing, PFW-397 #1310

Merged
merged 1 commit into from Apr 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions classes/wc-gateway-paypal-pro-angelleye.php
Expand Up @@ -1760,7 +1760,7 @@ public function process_subscription_payment($order) {
$customer_note = $customer_note_value ? substr(preg_replace("/[^A-Za-z0-9 ]/", "", $customer_note_value), 0, 256) : '';
$PaymentDetails = array(
'amt' => AngellEYE_Gateway_Paypal::number_format($order->get_total()), // Required. Total amount of order, including shipping, handling, and tax.
'currencycode' => get_woocommerce_currency(), // Required. Three-letter currency code. Default is USD.
'currencycode' => version_compare(WC_VERSION, '3.0', '<') ? $order->get_order_currency() : $order->get_currency(), // Required. Three-letter currency code. Default is USD.
'insuranceamt' => '', // Total shipping insurance costs for this order.
'shipdiscamt' => '0.00', // Shipping discount for the order, specified as a negative number.
'handlingamt' => '0.00', // Total handling costs for the order. If you specify handlingamt, you must also specify itemamt.
Expand Down Expand Up @@ -2130,7 +2130,7 @@ public function subscription_change_payment($order_id) {
);
$PaymentDetails = array(
'amt' => 0,
'currencycode' => get_woocommerce_currency(),
'currencycode' => version_compare(WC_VERSION, '3.0', '<') ? $order->get_order_currency() : $order->get_currency(),
);
$PayPalRequestData = array(
'DPFields' => $DPFields,
Expand Down
4 changes: 2 additions & 2 deletions classes/wc-gateway-paypal-pro-payflow-angelleye.php
Expand Up @@ -1285,7 +1285,7 @@ public function process_subscription_payment($order, $amount, $payment_token = n
'tender' => 'C', // Required. The method of payment. Values are: A = ACH, C = Credit Card, D = Pinless Debit, K = Telecheck, P = PayPal
'trxtype' => ($this->payment_action == 'Authorization' || $order->get_total() == 0 ) ? 'A' : 'S', // Required. Indicates the type of transaction to perform. Values are: A = Authorization, B = Balance Inquiry, C = Credit, D = Delayed Capture, F = Voice Authorization, I = Inquiry, L = Data Upload, N = Duplicate Transaction, S = Sale, V = Void
'amt' => AngellEYE_Gateway_Paypal::number_format($order->get_total()), // Required. Amount of the transaction. Must have 2 decimal places.
'currency' => get_woocommerce_currency(), //
'currency' => version_compare(WC_VERSION, '3.0', '<') ? $order->get_order_currency() : $order->get_currency(), //
'comment1' => apply_filters('ae_pppf_custom_parameter', $customer_note, $order), // Merchant-defined value for reporting and auditing purposes. 128 char max
'comment2' => apply_filters('ae_pppf_comment2_parameter', '', $order), // Merchant-defined value for reporting and auditing purposes. 128 char max
'recurring' => '', // Identifies the transaction as recurring. One of the following values: Y = transaction is recurring, N = transaction is not recurring.
Expand Down Expand Up @@ -1710,7 +1710,7 @@ public function subscription_change_payment($order_id) {
'acct' => $card->number,
'expdate' => $card->exp_month . $card->exp_year,
'amt' => '0.00',
'currency' => get_woocommerce_currency(),
'currency' => version_compare(WC_VERSION, '3.0', '<') ? $order->get_order_currency() : $order->get_currency(),
'cvv2' => $card->cvc,
'orderid' => '',
'orderdesc' => '',
Expand Down