| @@ 651-668 (lines=18) @@ | ||
| 648 | } |
|
| 649 | add_filter( 'wpinv_enabled_payment_gateways', 'wpinv_check_authorizenet_currency_support', 10, 1 ); |
|
| 650 | ||
| 651 | function wpinv_authorizenet_link_transaction_id( $transaction_id, $invoice_id, $invoice ) { |
|
| 652 | if ( $transaction_id == $invoice_id ) { |
|
| 653 | $link = $transaction_id; |
|
| 654 | } else { |
|
| 655 | if ( ! empty( $invoice ) && ! empty( $invoice->mode ) ) { |
|
| 656 | $mode = $invoice->mode; |
|
| 657 | } else { |
|
| 658 | $mode = wpinv_is_test_mode( 'authorizenet' ) ? 'test' : 'live'; |
|
| 659 | } |
|
| 660 | ||
| 661 | $url = $mode == 'test' ? 'https://sandbox.authorize.net/' : 'https://authorize.net/'; |
|
| 662 | $url .= 'ui/themes/sandbox/Transaction/TransactionReceipt.aspx?transid=' . $transaction_id; |
|
| 663 | ||
| 664 | $link = '<a href="' . esc_url( $url ) . '" target="_blank">' . $transaction_id . '</a>'; |
|
| 665 | } |
|
| 666 | ||
| 667 | return apply_filters( 'wpinv_authorizenet_link_payment_details_transaction_id', $link, $transaction_id, $invoice ); |
|
| 668 | } |
|
| 669 | add_filter( 'wpinv_payment_details_transaction_id-authorizenet', 'wpinv_authorizenet_link_transaction_id', 10, 3 ); |
|
| 670 | ||
| 671 | function wpinv_authorizenet_transaction_id_link( $transaction_id, $subscription ) { |
|
| @@ 760-777 (lines=18) @@ | ||
| 757 | } |
|
| 758 | add_filter( 'wpinv_payment_get_transaction_id-paypal', 'wpinv_paypal_get_transaction_id', 10, 1 ); |
|
| 759 | ||
| 760 | function wpinv_paypal_link_transaction_id( $transaction_id, $invoice_id, $invoice ) { |
|
| 761 | if ( $transaction_id == $invoice_id ) { |
|
| 762 | $transaction_link = $transaction_id; |
|
| 763 | } else { |
|
| 764 | if ( ! empty( $invoice ) && ! empty( $invoice->mode ) ) { |
|
| 765 | $mode = $invoice->mode; |
|
| 766 | } else { |
|
| 767 | $mode = wpinv_is_test_mode( 'paypal' ) ? 'test' : 'live'; |
|
| 768 | } |
|
| 769 | ||
| 770 | $sandbox = $mode == 'test' ? '.sandbox' : ''; |
|
| 771 | $transaction_url = 'https://www' . $sandbox . '.paypal.com/webscr?cmd=_history-details-from-hub&id=' . $transaction_id; |
|
| 772 | ||
| 773 | $transaction_link = '<a href="' . esc_url( $transaction_url ) . '" target="_blank">' . $transaction_id . '</a>'; |
|
| 774 | } |
|
| 775 | ||
| 776 | return apply_filters( 'wpinv_paypal_link_payment_details_transaction_id', $transaction_link, $transaction_id, $invoice ); |
|
| 777 | } |
|
| 778 | add_filter( 'wpinv_payment_details_transaction_id-paypal', 'wpinv_paypal_link_transaction_id', 10, 3 ); |
|
| 779 | ||
| 780 | function wpinv_paypal_profile_id_link( $profile_id, $subscription ) { |
|