Skip to content

Commit

Permalink
add article list to transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
Dirk Olbertz committed Dec 11, 2024
1 parent 237dcf9 commit 1a123e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/Payone/Transaction/PayPalV2Express.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ public function __construct( $gateway ) {
* @return \Payone\Payone\Api\Response
*/
public function execute( \WC_Order $order ) {
if ( $this->should_submit_cart() ) {
$this->add_article_list_to_transaction( $order );
}
$this->add_article_list_to_transaction( $order );
$this->set( 'reference', uniqid( 'ref', false) );
$this->set_once( 'amount', $order->get_total('edit') * 100 );
$this->set( 'currency', strtoupper( get_woocommerce_currency() ) );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public function __construct( $gateway ) {
public function execute( \WC_Cart $cart ) {
$this->set_once( 'amount', $cart->get_total( 'non-view' ) * 100 );
$this->set( 'currency', strtoupper( get_woocommerce_currency() ) );
$this->add_article_list_to_transaction( $cart );

return $this->submit();
}
Expand Down

0 comments on commit 1a123e2

Please sign in to comment.