Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › Sending Payment Transaction Id or Payment Confirmation Token to Second Site
- This topic has 3 replies, 2 voices, and was last updated 11 years, 7 months ago by admin.
-
AuthorPosts
-
April 12, 2013 at 7:32 am #8931sameerMember
We have a word press site where we are using Wp eStore plugin (site A), Now we have developed an another site (Site in a sub folder of same domain.
At site B we are separately registering users and then sending them to E cart Check out (Site A) for payment processing and after payment we redirecting them back to site for logging in, in normal if user is paying via paypal using same email which they used for registration at site B. Then this is validating the payment and creating the user name id and password for user. (Here we are checking the customer tables and sales table in database via script)
We are facing problem in user payment verification. When user is using two different Email id one for registering at our site (Site and another different email id for paying via PayPal, similar problem may occur to 2 checkout and other payment processor also.
Is it possible that when we are sending user to (site A) for payment from (Site Plugin can store a string in customer table and sales table database which Site B will assign from registration page to each user as our own unique transaction code, so that when user land back to site b transaction done page, we can verify that string via backend in database table and generate the username and password for that user.
April 13, 2013 at 2:19 am #55097adminKeymasterWP eStore has a feature to forward the payment notification (IPN) after a payment to another URL.
Go to the “WP eStore Settings” -> “3rd Party Settings” and look for the following field:
PayPal IPN Post URL
You should be able to use that feature to forward the IPN to your other WP installation (Site .
Regarding setting a transaction ID, the payment gateway actually generates the transaction ID so it is not ideal for you to generate it. However, you should be able to pass some sort of a unique id and pass it via the “custom” field (you will have access to this custom field value in the payment notification). WP eStore has a filter that allows you to add more content to the custom field via another plugin or addon. In your case it will be a little tricky because I think you want to set in from your second site where eStore is not running.
April 13, 2013 at 4:55 am #55098sameerMemberThanks for Reply
1. Yes we had looked in to this -> WP eStore feature to forward the payment notification (IPN) after a payment to another URL. (“WP eStore Settings” -> “3rd Party Settings” -> “Post IPN to 3rd party application”)
As we understand this will post only Paypal Based transaction IPN, here we are also using 2checkout. (in this case 2 checkout transaction info will not Passed on via this feature ?
2. Yes Our second site (B)is not a WordPress installation this is ASP.net site and here we can not set the custom field or WP Estore so that we are trying to send the user to pay via site (A)estore and after payment redirecting them to second site ( here we are using email of user to validate the payments, as user post back to return url we initiate query to check the Wp-E-store_customer tables, sales table to check is there transaction id available for that email. if the user is paying via same email then we are able to generate username and password at site ( but if user is paying by some other email then we are not getting value in db tables.
* Here we need some workaround to insert a unique variable which is generated by Site B,
and we can pass it by session to E-store & E-store insert it in the customer tables and Sales table so that when user post back we can validate it via backed in db tables.
* Is there any other suggested arrangement for this scenario?
Thanks & Regards
April 14, 2013 at 12:36 am #55099adminKeymaster1) It will post/forward the data for all gateway checkout (initially it was for PayPal but we made it to work with all gateway checkout).
2) I think the following scenario should work for you:
i) Generate a unique code from your site B and set it in the session.
ii) When the user is checking out from site A, you can tweak eStore so it read the unique code from the session and append it to the “custom” field variable.
iii) After the payment, when eStore forwards the IPN to your script, the custom field value will be present and you can use that value to connect that transaction to the appropriate user account.
or
iii) After the payment, tweak eStore to save the custom field value of the transaction somewhere in the database so you can look it up later.
If you need help with the actual coding/tweak then you will need to go via this option:
-
AuthorPosts
- You must be logged in to reply to this topic.