Permalink
Browse files

Change EC 3.0 cancel URL (#2205)

Change the cancel_url to the cart page instead of the shipping-billing
  • Loading branch information...
1 parent 523c3a0 commit 307d75ebb3bfb4c02ecd1045a697b65e48c6f2e6 @misulicus misulicus committed with JustinSainton Dec 13, 2016
Showing with 3 additions and 3 deletions.
  1. +3 −3 wpsc-components/merchant-core-v3/gateways/paypal-express-checkout.php
@@ -33,7 +33,7 @@ public function __construct( $options, $child = false ) {
'api_username' => $this->setting->get( 'api_username' ),
'api_password' => $this->setting->get( 'api_password' ),
'api_signature' => $this->setting->get( 'api_signature' ),
- 'cancel_url' => $this->get_shopping_cart_payment_url(),
+ 'cancel_url' => wpsc_get_cart_url(),
'currency' => $this->get_currency_code(),
'test' => (bool) $this->setting->get( 'sandbox_mode' ),
'address_override' => 1,
@@ -764,7 +764,7 @@ public function filter_paypal_error_page() {
<li><?php echo esc_html( $error['details'] ) ?> (<?php echo esc_html( $error['code'] ); ?>)</li>
<?php endforeach; ?>
</ul>
- <p><a href="<?php echo esc_url( $this->get_shopping_cart_payment_url() ); ?>"><?php ( 'Click here to go back to the checkout page.') ?></a></p>
+ <p><a href="<?php echo esc_url( wpsc_get_cart_url() ); ?>"><?php ( 'Click here to go back to the checkout page.') ?></a></p>
<?php
$output = apply_filters( 'wpsc_paypal_express_checkout_gateway_error_message', ob_get_clean(), $errors );
return $output;
@@ -779,7 +779,7 @@ public function filter_generic_error_page() {
ob_start();
?>
<p><?php _e( 'Sorry, but your transaction could not be processed by PayPal for some reason. Please contact the site administrator.' , 'wp-e-commerce' ); ?></p>
-<p><a href="<?php echo esc_attr( $this->get_shopping_cart_payment_url() ); ?>"><?php _e( 'Click here to go back to the checkout page.', 'wp-e-commerce' ) ?></a></p>
+<p><a href="<?php echo esc_attr( wpsc_get_cart_url() ); ?>"><?php _e( 'Click here to go back to the checkout page.', 'wp-e-commerce' ) ?></a></p>
<?php
$output = apply_filters( 'wpsc_paypal_express_checkout_generic_error_message', ob_get_clean() );
return $output;

0 comments on commit 307d75e

Please sign in to comment.