| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
X-Payments API Recharge with Cart questions | |||
|
|
Thread Tools |
#1
|
|||||||
|
|||||||
X-Payments API Recharge with Cart questions
I'm trying to use the API for X-Payments to recharge and to create an order in the process.
So far, I have gotten the recharge to work, and I get a bare order created. It has the customer info and lists in the customer portal, but I cannot get any line items to show there. The total, however, is correct. But I'd like to have more info in there in case a customer logs in and wants to verify their charge history. I'm using: Code:
I have a product in my X-Cart with the SKU of 'misc-charge' and no set price. I also can't get the tax to breakout. There isn't a lot of documentation about the API so I can't really figure out what more to try. I did finally figure out that the mechanism to tell the cart about the new order (since you are communicating with X-Payments and not X-Cart) is this line: Code:
That doesn't exactly seem like a "callback" URL to me, but that's the way X-Payments pings your cart with the info about the new order.
__________________
X-Cart version 4.7.12 |
|||||||
#2
|
|||||||
|
|||||||
Re: X-Payments API Recharge with Cart questions
Please refer to this article for the detailed description of the recharge requests:
https://www.x-payments.com/help/X-Payments:Charge_again_transaction_request_(Tokeniz ation) You can send the information about items, shipping cost, etc in the "cart" block. The callback request contains the information about payment, however since recharge is a direct POST request, you can use the response for that request to get the result of the transaction. It contains the payment status and information about any errors occurred. Meanwhile, to process the callbacks you should create your script which should be accessible via internet and pass its URL. Note: information in callback request to your script is encrypted. Please refer to these articles for the detailed information: https://www.x-payments.com/help/X-Payments:Callback_request_with_service_payment_inf ormation https://www.x-payments.com/help/X-Payments:Detailed_payment_and_transaction_informat ion_request#Response_specification The PHP implementation of the encryption/decryption can be found here: https://drive.google.com/drive/folders/0B6p7sehSZL8_R3dHUk1sQVYteUE
__________________
joss@x-cart.com Last edited by kai : 05-19-2017 at 12:39 AM. |
|||||||
|
#3
|
|||||||
|
|||||||
Re: X-Payments API Recharge with Cart questions
Thanks.
Still working through the info, but your first and third links are broken - first needs a ")" and third had : D converted into "grin."
__________________
X-Cart version 4.7.12 |
|||||||
#4
|
|||||||
|
|||||||
Re: X-Payments API Recharge with Cart questions
To break this down into pieces - here's my first chunk.
I believe that if the customer has an account in X-Cart, the X-Payments recharge request only needs this identifying information to successfully link a new order to that customer: Code:
__________________
X-Cart version 4.7.12 |
|||||||
#5
|
|||||||
|
|||||||
Re: X-Payments API Recharge with Cart questions
I'm pretty sure there's a bug in this API, or in X-Payments.
I still cannot get much of the info I post from X-Payments over to X-Cart. All I get in X-Cart is a very minimal order with a total. The order is tied to the customer who made the original charge in X-Payments (the reference transaction), but there are several issues: -No matter what address I post with the recharge XML to X-Payments, X-Cart makes the order with the default billing and shipping information from the customer's profile. So X-Cart uses the defaults in the customer's address book. X-Payments uses the information posted. I have tried this a few different ways and found this to be the pattern. I have not yet tried with a customer who doesn't have a profile. -If I change the email address in the recharge request, it has no effect. Essentially, this information is discarded completely. -No items in the <cart> area carry over to X-Cart or are shown in X-Payments (I don't think they could possibly be shown in X-Payments). Essentially, the cart information is also discarded. -Same for tax and shipping costs - the information is discarded. It feels like the only information that X-Payments successfully communicates to X-Cart is the customer and the total. All other info is lost somewhere in the process.
__________________
X-Cart version 4.7.12 |
|||||||
#6
|
|||||||
|
|||||||
Re: X-Payments API Recharge with Cart questions
I'm still working on this problem. With your example code (just changing the data fields) I cannot get a cart to show up in the X-Cart side. I've made many, many changes to the post code, and still, no progress.
Can someone at X-Cart just try the sample code on your side just to confirm that this works for you? If it works for you, I'll keep working. But I really think there may be an issue in the code somewhere. Thanks, Joe
__________________
X-Cart version 4.7.12 |
|||||||
#7
|
|||||||||
|
|||||||||
Re: X-Payments API Recharge with Cart questions
Hi Joe,
I am really sorry we can't get back to you here. Right now we are busy with preparing our connectors for new X-Cart versions which are going to be released very soon.
__________________
Sincerely yours, Alex Mulin VP of Business Development for X-Cart X-Payments product manager |
|||||||||
|
|||
X-Cart forums © 2001-2020
|