diff --git a/app/appserver/modules/Payment/block/paypal/standard/Start.php b/app/appserver/modules/Payment/block/paypal/standard/Start.php index 338dec9b8a667222ae87819849b55194a0bc40d7..2654aa869e7bec4a44fdcf7b22745f3dc8c3c327 100644 --- a/app/appserver/modules/Payment/block/paypal/standard/Start.php +++ b/app/appserver/modules/Payment/block/paypal/standard/Start.php @@ -17,7 +17,7 @@ use Yii; */ class Start { - public function startPayment() + public function startPayment($increment_id) { $methodName_ = 'SetExpressCheckout'; $return_url = Yii::$app->request->post('return_url'); @@ -29,7 +29,7 @@ class Start //var_dump($checkoutReturn); if (strtolower($checkoutReturn['ACK']) == 'success') { $token = $checkoutReturn['TOKEN']; - $increment_id = Yii::$service->order->getSessionIncrementId(); + //$increment_id = Yii::$service->order->getSessionIncrementId(); //echo $increment_id ;exit; # 将token写入到订单中 Yii::$service->order->updateTokenByIncrementId($increment_id,$token); diff --git a/app/appserver/modules/Payment/controllers/paypal/StandardController.php b/app/appserver/modules/Payment/controllers/paypal/StandardController.php index 817cfe426cd8dccb90dca09ba8504f1a9396a06c..f5265c1f831adccf44f14ba627ccb038e5537058 100644 --- a/app/appserver/modules/Payment/controllers/paypal/StandardController.php +++ b/app/appserver/modules/Payment/controllers/paypal/StandardController.php @@ -32,7 +32,7 @@ class StandardController extends AppserverController Yii::$service->payment->setPaymentMethod($payment_method); $increment_id = Yii::$app->request->post('increment_id'); Yii::$service->order->setCurrentOrderIncrementId($increment_id); - return $this->getBlock()->startPayment(); + return $this->getBlock()->startPayment($increment_id); } /** * 2.Review 浠巔aypal纭鍚庤繑鍥炵殑閮ㄥ垎