How to import invoice payment information into Sage 500/Mas 500 - sage-erp

We have an existing payment engine that processes credit card and checking. I have created the ability to lookup invoices with a balance, "grab" all the details, and offer customer payment through other means. Now I need to bring the payment information back into Sage 500, so the invoice will be closed. Has anyone out there done this before, or know of stored procedures I should focus on?
PS - I am fairly fluent with SQL. I would like to automate this process, so I am trying the SQL way before involving Data Import Manager.

Yes, you can import AR Cash receipt into the Sage 500 by populating staging table and running spARapiPendingCashReceiptIns stored procedure.

Related

Orders getting created without any payment transactions - Salesforce B2C Commerce Cloud

Seeking guidance, help.
My current instance of Salesforce B2C Commerce is leveraging a third party payment processor/gateway (e.g. Paypal, Stripe, Adyen etc...). Experiencing an issue on certain orders only, where orders are being created but no actual payment transaction. Now this happens to certain orders only, and I am unable to troubleshoot it as there aren't any error logs in Business Manager nor the payment processor/gateway logs.
Anyone experienced the same? Where else could I check for orders sitting in "created" state without an actual payment transaction?
Checked on the following things:
Tested with bad test payment methods like credit cards
Tested with last minute stock changes
Validated webhooks and looked for errors relating to "time-outs" (couldn't find any)
Checked the actual order in business manager

Paypal how to differentiate between multiple subscriptions for a same user

I'm currently programming a small basket app and I was wondering what was the variable that would be used to differentiate between subcriptions for one user.
Let say my user has 4 subscriptions, and it is now the time to receive its recurring payment. I receive the payment message from Paypal, parse it and do my DB update. How do I know which recurring I need to process?
From what I read, its probably the subscr_id=I-HPDM8GP... that I need to check but I'm not sure?
Thanks
This is a pretty broad question so I'm going to have to make a couple of assumptions...
1) You're using standard subscription buttons..??
2) You have a users table in your database already, and it relates to an orders/invoices table in your database by customer ID..??
If those assumptions are accurate, then what I would recommend is that you include the order ID from your system in the "invoice" parameter with the subscription button code.
If you're not already using it then it would be wise to setup an IPN solution to process subscription payments, and within the IPN data you would get the same order ID back in that "invoice" parameter, so within that solution you could update your system accordingly using that order ID which then relates back to your customer IDs in your own system.
With all of this data included and related correctly in your system you could easily pull reports for different users that include all of their subscriptions and payment history.

How to link related transactions obtained by TransactionSearch and GetTransactionDetails?

TL;DR- How do I know if I really did get paid, via the PayPal NVP API?
Longer version
I'm writing code to automagically process and classify transactions from our PP business account. I have code that calls NVP methods TransactionSearch and GetTransactionDetails and fills a few database tables with the results that are returned. This happens every day for the previous 24 hours' worth of transactions. So far, so good.
I began from the assumption that the same information available via manual CSV export via the PayPal web interface would be available via the API, but I'm now discovering that either this is not the case, or there is another API call I should be making to get the rest of the information I need.
In particular, GetTransactionDetails doesn't seem to return the equivalent of CSV field "Reference Txn ID" and, in a few cases, I can't see how to connect related transactions.
So, my question is how can I obtain the reference transaction ID, or how do I otherwise connect these associated transactions?
Example 1
This is (probably) the most common sort of situation where the reference transaction ID is needed.
Depending on the buyer's funding source, you may either see a purchase complete instantly or, if the transaction must be cleared, complete across three separate transactions:
The original payment, detail of which gives buyer's name, email, address, invoice number, item ID, gross, fee and net amounts etc.
followed immediately by a debit of the net amount
followed, in a few days, by a credit of the net amount.
It is crucial to match the three transactions because you don't know whether the payment will succeed or be declined (and therefore whether you've actually got the money) unless you do.
In the data I have available to me at the moment, there is only one such example of this situation, and calls to GetTransactionDetails for the settlement transactions fail completely ("The transaction could not be loaded") — possibly because, in that one instance, I know that the payment was made with a credit card by somebody who doesn't have a PayPal account.
This might be an anomaly, or it might be the common case. I have seen this triplet of transactions quite frequently in other PayPal accounts, but not this one, so I can't be sure.
Example 2
A payment in a foreign currency will typically generate three transactions, rather like in Example 1:
The original payment (eg in €), the detail of which gives the sender's name and email address etc;
this is then followed by an immediate debit of the (probably net) amount in €
and then an immediate credit in USD.
From the point of view of the NVP API, GetTransactionDetails usually returns values labelled SETTLEAMT and SETTLEAMTCURRENCYCODE for the original payment. No further processing is required.
However, a recent such transaction (for reasons that even PayPal could not adequately explain) did not auto-convert, and the GetTransactionDetails call lacks the settlement values even after the conversion was performed manually.
The transactions are all there — but I cannot see any programmatic way to associate them because an attempt to call GetTransactionDetails on currency conversion transactions returns the error "You can not get the details for this type of transaction".
—
Any advice or experience relating to automatic processing of PayPal transactions? Is there any way to duplicate, programmatically, the same data included in the CSV export?
If necessary, I'd be happy to process the CSV export if there were some way to generate it programmatically, but I don't even know of a way to do that (short of a Selenium-driven solution full of pitfalls).
GetTransactionDetails will include a PARENTTRANSACTIONID if there is a related transaction. For example, a refund transaction would have a parent transaction ID.

Booking system to take a deposit and then final amount at a later date

This is more of a question regarding flow than code.
I'm currently working on a booking website for a holiday home. I've implemented a booking system which currently takes full payment at the time of booking. This uses PayPal REST API. It works fine no problems code-wise.
However my client would like the system to take a deposit when booking (20%) of the total. Then take the remaining amount later on (through the site). This seems strange to me and I've never used a website which does this so I'm not sure what the flow should be.
The only way I can think of achieving this is that the user has to come to the website at some point in the future to pay the remaining amount. I could send them email reminders but it seems a bit awkward to do that.
Has anyone done anything like this in the past?
In order to take the money later, you need to store the credit card data in your system, which is not quite legal unless you are authorized payment service provider (and I'm almost sure you're not).
We have the same case in our reservation system. Generally, you'd allow credit card payment only for deposit, and later final amount is paid via bank transfer or cash, for example, and has to be settled manually by an operator.
Your idea is not bad, however. You could inform the user about the final amount and due date in the booking confirmation email and later on send them reminders.
You can utilize reference transactions to handle this without storing/saving any billing information on your server.
Reference transactions can be used in Express Checkout as well as with Payments Pro.
Basically, the way it'll work is that you can process the original 20% and then you'll save that transaction ID in your database. Once you're ready to process the remaining amount you just make a call to DoReferenceTransaction and supply the original transaction ID along with the new amount to charge. PayPal will then charge this new amount using the billing information that they have saved on their server.

Write app using QuickBooks API to add transaction after credit card sale

I am exploring the QuickBooks API and am still unclear if my desired outcome is possible. I apologize if something like this was already answered here, but I was unable to find it.
Here is what I am trying to accomplish:
This whole process except for the credit card swiping should be automatic.
We have 1099 eligible salespersons entered as vendors. I am trying to automate the sales process through a custom mobile app. I can handle the credit card transactions just fine on our server (outside of QuickBooks), but when the transaction comes back complete I want to be able to add the invoice to our QuickBooks online database, then add an entry to pay the Vendor based on the commission percentage of the total amount made.
I know this is possible through an app that presents the user the ability to login with the "blue button", but I would like this whole process automated with no user intervention. Is this even possible? If you need any clarification regarding what I am trying to accomplish I would be happy to clarify.
Thanks for any input. Any help is very much appreciated. Thanks!