Jump to content

Edit History

pg_dev

pg_dev

Hi, I'm working on external type payment module where i need to pass the order reference (that we get on successful order validation & order confirmation page) to payment gateway via POST method. I need order reference to be passed in ' $merchant_ref_number ' but the redirection to payment gateway doesn't work the moment when I use $merchant_ref_number $order_id-> reference;  instead of '$merchant_ref_number = trim( (string) $order_id ); '   becoz $merchant_ref_number is one of the parameters passed in request url to gateway and its expected to pass order_id (i.e need number not characters as we get for 9 digit reference) inorder to successfully redirect to gateway.  I checked in chrome inspect network tab, the 'merchant_ref_number' field remains empty while sending payment request url.image.png.5f8dac157e5544c74e97fc43c34d72d8.png

 Check My code below: 

 $merchant_ref_number = $order_id->reference;



and I'm getting error as below: 
 

log error: Exception on hook paymentOptions for module . Notice: Trying to get property \'reference\' of non-object


AND IF I use this :

$merchant_ref_number = $order->reference;

I get log error as this

Exception on hook paymentOptions for module . Notice: Undefined variable: order



Can anyone suggest me what's the right way to pass order reference so that it can be stored in gateway side? Please!

pg_dev

pg_dev

Hi, I'm working on external type payment module where i need to pass the order reference (that we get on successful order validation & order confirmation page) to payment gateway via POST method. I need order reference to be passed in ' $merchant_ref_number ' but the redirection to payment gateway doesn't work the moment when I use $merchant_ref_number $order_id-> reference;  instead of '$merchant_ref_number = trim( (string) $order_id ); '   becoz $merchant_ref_number is one of the parameters passed in request url to gateway and its expected to pass order_id (i.e need number not characters as we get for 9 digit reference) inorder to successfully redirect to gateway.  My code below: 

 $merchant_ref_number = $order_id->reference;



and I'm getting error as below: 
 

log error: Exception on hook paymentOptions for module . Notice: Trying to get property \'reference\' of non-object


AND IF I use this :

$merchant_ref_number = $order->reference;

I get log error as this

Exception on hook paymentOptions for module . Notice: Undefined variable: order



Can anyone suggest me what's the right way to pass order reference so that it can be stored in gateway side? Please!

pg_dev

pg_dev

Hi, I'm working on external type payment module where i need to pass the order reference (that we get on successful order validation & order confirmation page) to payment gateway via POST method. My code below: 

 $merchant_ref_number = $order_id->reference;



and I'm getting error as below: 
 

log error: Exception on hook paymentOptions for module . Notice: Trying to get property \'reference\' of non-object


AND IF I use this :

$merchant_ref_number = $order->reference;

I get log error as this

Exception on hook paymentOptions for module . Notice: Undefined variable: order



Can anyone suggest me what's the right way to pass order reference so that it can be stored in gateway side? Please!

×
×
  • Create New...