Skip to content

Commit

Permalink
vue paypal支付,incrementId
Browse files Browse the repository at this point in the history
  • Loading branch information
fancyecommerce committed Oct 15, 2019
1 parent be3397c commit 89acc07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/appserver/modules/Payment/block/paypal/standard/Start.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
class Start
{
public function startPayment()
public function startPayment($increment_id)
{
$methodName_ = 'SetExpressCheckout';
$return_url = Yii::$app->request->post('return_url');
Expand All @@ -29,7 +29,7 @@ public function startPayment()
//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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function actionStart()
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 从paypal确认后返回的部分
Expand Down

0 comments on commit 89acc07

Please sign in to comment.