Refactor payment confirmation template and fix status check
This commit is contained in:
@@ -202,8 +202,12 @@ class ShopBasket
|
||||
|
||||
$values['wp'] = \front\factory\ShopProduct::product_wp( $values[ 'product-id' ] );
|
||||
|
||||
$attributes_implode = '';
|
||||
// generuj unikalny kod produktu dodanego do koszyka
|
||||
$product_code = md5( $values['product-id'] . implode( '|', $attributes ) . $values['product-message'] . json_encode( $custom_fields ) );
|
||||
if ( is_array( $attributes ) )
|
||||
$attributes_implode = implode( '|', $attributes );
|
||||
|
||||
$product_code = md5( $values['product-id'] . $attributes_implode . $values['product-message'] . json_encode( $custom_fields ) );
|
||||
|
||||
if ( isset( $basket[ $product_code ] ) )
|
||||
$basket[ $product_code ][ 'quantity' ] += $values[ 'quantity' ];
|
||||
|
||||
@@ -18,6 +18,8 @@ class ShopOrder
|
||||
{
|
||||
global $mdb;
|
||||
|
||||
file_put_contents( 'tpay.txt', print_r( $_POST, true ) . print_r( $_GET, true ), FILE_APPEND );
|
||||
|
||||
if ( \S::get( 'tr_status' ) == 'TRUE' and \S::get( 'tr_crc' ) )
|
||||
{
|
||||
$order = new \shop\Order( 0, \S::get( 'tr_crc' ) );
|
||||
|
||||
Reference in New Issue
Block a user