|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Call Back WorldPay Junior
ok im having some trouble with geting the call back featue to work here are the details
<cfif IsDefined("FORM.transId")> <!--- Set local variables from the http post / FORM variables returned from World Pay ---> <cfset var.WPreturnTranId = FORM.transId> <cfset var.WPreturnTranStatus = FORM.transStatus> <cfset var.WPreturnOrderID = FORM.cartId> <cfset var.WPreturnOrderAmount = FORM.amount> <!--- Set report message based on responce from World Pay ---> <cfif var.WPreturnTranStatus EQ "Y"> <cfset odrStatus = 2> <cfset odrNotes = "World Pay has verified payment."> <table cellpadding="0" cellspacing="0" border="0" width="612" align="center"> <tr> <td align="center" class="pageHeader">Thank you for your order</td> </tr> <tr> <td align="center">Here are your order links:</td> </tr> <tr> <td align="center"><a href="http://www.urbanbreakzfm.com/newshop/filename.zip">Download "filename1" Now</a></td> </tr> </table> <cfelseif var.WPreturnTranStatus EQ "C"> <cfset odrStatus = 1> <cfset odrNotes = "AUTHORIZATION FAILURE! World Pay was unable to verify payment. Order reset to Pending, but is considered Cancelled by WorldPay. Check your World Pay Account for more information."> <table cellpadding="0" cellspacing="0" border="0" width="612" align="center"> <tr> <td align="center" class="pageHeader">Your Order has been cancelled.</td> </tr> </table> <cfelse> <cfset odrStatus = 0> <cfset odrNotes = "Unknown payment Status response from World Pay. Check WorldPay account for more information."> <table cellpadding="0" cellspacing="0" border="0" width="612" align="center"> <tr> <td align="center" class="pageHeader">Unknown payment Status response from World Pay. Check WorldPay account for more information.</td> </tr> </table> </cfif> <cfif OdrStatus NEQ 0> <!--- First we check to see if the World Pay order total and the recorded order total match. ---> <cfquery name="rs_verifyamount" datasource="#request.dsn#" username="#request.dsnUsername#" password="#request.dsnPassword#"> SELECT order_Total FROM tbl_orders WHERE order_ID = '#var.WPreturnOrderID#' </cfquery> <!--- To prevent tampering or fraud, set alert if amount of World Pay transaction and Order amount don't match. ---> <cfif rs_verifyamount.order_Total NEQ var.WPreturnOrderAmount> <cfset odrStatus = 1> <cfset odrNotes = "ALERT!! The order total returned from World Pay was NOT THE SAME as our order total. The order may have been tampered with. Check your World Pay Admin for more information. Order was left set to Pending."> </cfif> <!--- Update Order record ---> <cfquery datasource="#request.dsn#" username="#request.dsnUsername#" password="#request.dsnPassword#"> UPDATE tbl_orders SET order_TransactionID = '#var.WPreturnTranId#', order_Status = #odrStatus#, order_Notes = '#odrNotes#' WHERE order_ID = '#var.WPreturnOrderID#' </cfquery> <!--- Notify Merchnat that WorldPay has posted ---> <cfmail to="#var.CompanyEmail#" from="#var.CompanyEmail#" subject="World Pay Results Returned" server="#var.MailServer#"> World Pay has returned the transaction results for order number: #var.WPreturnOrderID# World Pay Transaction ID: #var.WPreturnTranId# Payment Validation Message: #odrNotes# </cfmail> </cfif><!--- [END IF] -- OdrStatus NEQ 0 ---> </cfif><!--- [END IF] -- IsDefined ('FORM.transId') ---> </cfsilent> </cfoutput> is the site code we belive it is something to do with the code. if anyone could enlight me it would be great appreciated, thanks alot. |
|
#2
|
|||
|
|||
|
what is the error you are getting?
|
|
#3
|
|||
|
|||
|
well it goes through to world pay and then it brings up all world pays default even tho callback and the link is enabled it was giving this error :
This callback failure means we were unable to pass information to your server about the following transaction: Transaction ID: 117602933 Cart ID: 0E8A3819-C764-46BC-C0FC5FEBF78F2E08 Installation ID: 109855 Error reported: Callback to http://www.urbanbreakzfm.com/newshop/wpCallBackNew.cfm: NOT OK, recevied HTTP status: 500 Server Reference: mggaeq4a:callbackFailureEmail-20059:MerchReq-121 |
|
#4
|
|||
|
|||
|
I personally have not used this gateway but I found some information on their support pages. Hope this helps.
http://support.worldpay.com/kb/reference/faqs/callback_faqs.html#callback_failure |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Call Back WorldPay Junior |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|