From d1bc1644b0da0c57b4cb82fe3be60a41a004856e Mon Sep 17 00:00:00 2001 From: dzung2t Date: Fri, 7 Aug 2015 12:32:40 +0700 Subject: [PATCH] Update Reference Id --- src/paymentwall_gateway.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/paymentwall_gateway.php b/src/paymentwall_gateway.php index 3794402..1efc624 100644 --- a/src/paymentwall_gateway.php +++ b/src/paymentwall_gateway.php @@ -176,7 +176,7 @@ function ipnResponse() if ($this->settings['enable_delivery']) { // Delivery Confirmation $delivery = new Paymentwall_GenerericApiObject('delivery'); - $response = $delivery->post($this->prepareDeliveryConfirmationData($order)); + $response = $delivery->post($this->prepareDeliveryConfirmationData($order, $pingback->getReferenceId())); } $order->add_order_note(__('Paymentwall payment completed', 'woocommerce')); @@ -257,10 +257,10 @@ function prepareUserProfileData($order) ); } - function prepareDeliveryConfirmationData($order) + function prepareDeliveryConfirmationData($order, $ref) { return array( - 'payment_id' => $order->payment_method, + 'payment_id' => $ref, 'type' => 'digital', 'status' => 'delivered', 'estimated_delivery_datetime' => date('Y/m/d H:i:s'),