Skip to content

Commit 3d1cde1

Browse files
committed
Updated CCNow IPN Code
1 parent 0b52dfb commit 3d1cde1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Services/CCNow.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,11 @@ public function complete(int $id, SubscriptionProductContract $product, Subscrip
7272
*/
7373
public function ipn(array $input){
7474
$item_number = array_get($input, 'x_invoice_num');
75+
if(empty($item_number)){
76+
$item_number = array_get($input, 'x_product_sku_1');
77+
}
7578
if(!empty($item_number)){
76-
$txn_id = str_random(12);
79+
$txn_id = array_get($input, 'x_orderid');
7780
$subscr_id = array_get($input, 'x_orderid');
7881
$amount = array_get($input, 'x_amount_usd', array_get($input, 'x_amount'));
7982
$status = array_get($input, 'x_status');

0 commit comments

Comments
 (0)