Skip to content

Commit

Permalink
Refunds are not working properly, ref #956
Browse files Browse the repository at this point in the history
  • Loading branch information
kcppdevelopers committed Dec 11, 2017
1 parent 6727093 commit e5e0ed0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions classes/wc-gateway-paypal-express-angelleye.php
Original file line number Diff line number Diff line change
Expand Up @@ -1484,8 +1484,12 @@ public function free_signup_order_payment($order_id) {
public function process_refund($order_id, $amount = null, $reason = '') {
require_once( PAYPAL_FOR_WOOCOMMERCE_PLUGIN_DIR . '/angelleye-includes/express-checkout/class-wc-gateway-paypal-express-request-angelleye.php' );
$paypal_express_request = new WC_Gateway_PayPal_Express_Request_AngellEYE($this);
$bool = $paypal_express_request->angelleye_process_refund($order_id, $amount, $reason);
if($bool == true) {
$response = $paypal_express_request->angelleye_process_refund($order_id, $amount, $reason);
if ( is_wp_error( $response ) ) {
self::log('Refund Error: ' . $response->get_error_message());
throw new Exception( $response->get_error_message() );
}
if($response == true) {
return true;
}
}
Expand Down

0 comments on commit e5e0ed0

Please sign in to comment.