Skip to content

Commit

Permalink
Merge 5b2a37f into ff386e5
Browse files Browse the repository at this point in the history
  • Loading branch information
bennukem committed Jan 19, 2018
2 parents ff386e5 + 5b2a37f commit c05aa9f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,31 @@ $model = new \ArrayObject([
$ecpay->execute(new Capture($model));
```

6. Your Payment entity must to have the items list
```php
<?php

private $items = array();

```

7. In payment action, the $items parameters need to be like this
```php
<?php

$payment->setItems(array(
array(
'Name' => $product->getName(),
'Count' => 1,
'Word' => '個',
'Price' => $product->getPrice(),
'TaxType' => 1,
'URL' => $this->generateURL('product', array(), UrlGeneratorInterface::ABSOLUTE_URL),
),
));

```

## Resources

* [Documentation](https://github.com/Payum/Payum/blob/master/src/Payum/Core/Resources/docs/index.md)
Expand Down
1 change: 1 addition & 0 deletions src/Action/ConvertPaymentAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public function execute($request)
$details['MerchantTradeNo'] = $payment->getNumber();
$details['TotalAmount'] = $payment->getTotalAmount();
$details['TradeDesc'] = $payment->getDescription();
$details['Items'] = $payment->getItems();

$request->setResult((array) $details);
}
Expand Down
1 change: 1 addition & 0 deletions src/Action/ConvertPaymentLogisticsAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public function execute($request)
$details['ReceiverEmail'] = $payment->getClientEmail();
$details['GoodsAmount'] = $payment->getTotalAmount();
$details['TradeDesc'] = $payment->getDescription();
$details['Items'] = $payment->getItems();

$details['AllPayLogisticsID'] = $details['MerchantTradeNo'];

Expand Down

0 comments on commit c05aa9f

Please sign in to comment.