arambert / paybox-direct-plus Goto Github PK
View Code? Open in Web Editor NEWPaybox Direct Plus ActiveMerchant Billing Gateway implementation
License: MIT License
Paybox Direct Plus ActiveMerchant Billing Gateway implementation
License: MIT License
Hi,
I'm trying to use your gem but I always get a "Emetteur de carte inconnu" message while running
def credit_card(number = '1111222233334444', options = {})
defaults = {
number: number,
month: '12',
year: '2016',
first_name: 'Longbob',
last_name: 'Longsen',
verification_value: '123',
brand: 'visa'
}.update(options)
ActiveMerchant::Billing::CreditCard.new(defaults)
end
@gateway = ActiveMerchant::Billing::PayboxDirectPlusGateway.new(
login: my_login,
password: my_password
)
@amount = 100
@credit_card = credit_card
@options = {
order_id: "REF#{Time.now.usec}",
user_reference: "USER#{Time.now.usec}",
devise: '978',
}
response = @gateway.subscriber_create(@amount, @credit_card, @options)
Any Idea ? I used my credential to enter my prepared admin link.
Notice that devise field looks like a mandatory field !
Hi !
Many thanks for this gem! In the Paybox Direct doc, they say we can simulate error codes by submitting a variable called ERRORCODETEST. Is there a way to this with this library ?
Many thanks by advance.
Sylvain
Hi,
thanks for your work on implementing the "PLUS" feature of Paybox. I'm also working on this :).
In your code you use creditcard.gateway_customer_profile_id.
This attribute is not implemented in ActiveMerchant::Billing::CreditCard object resulting in NoMethodError.
Can you give explanation in the README or in the code on how you implemented this attribute (monkey-patch ?)..?
Thanks,
Nicolas Blanco.
A few of the ActiveMerchant::Billing::Response
attributes are based on "magic" from the params and options hash.
Moving
:test => test?,
:authorization => response[:numappel].to_s + response[:numtrans].to_s,
:fraud_review => fraud_review?(response),
from params to options enable these fields to be accessible directly. Authorization field example
Options include moving the fields from params to options, or duplicating them for backwards support where people may already be accessing them via Response.params.
Happy to put up a pull request.
When I try to execute a "credit", I receive the following error: Mandatory values missing keyword:11 Type:21
Here is remote test that I wrote to demonstrate the problem:
def test_create_profile_capture_and_credit
assert response = @gateway.create_payment_profile(@amount, @credit_card, @options)
assert_success response
credit_card_reference = response.params["credit_card_reference"]
assert_not_nil credit_card_reference
assert capture = @gateway.capture(@amount, response.params["authorization"], @options)
assert_success capture
assert credit = @gateway.credit(@amount, capture.params["authorization"], @options)
assert_equal 'The transaction was approved', credit.message
assert_success credit
end
When I tried to use credit using the implementation provided in the gem, it didn't work for me (Paybox returned me network errors). I had to overload the implementation to make it work (only tested in test mode yet). Here is how I did it :
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
class PayboxDirectPlusGateway < Gateway
def credit(money, creditcard, options = {})
post = {}
add_invoice(post, options)
add_creditcard(post, creditcard, options)
add_user_reference(post, options)
commit('subscriber_credit', money, post)
end
end
end
end
Hi,
We have sometimes a "00005: Numéro de question invalide" response error when the payment have been set as succeed.
After digging in Paybox logs with Paybox support, we figured out that the problem come from the timeout of the first request to ppps.paybox.com which isn't waiting for 30s at least to call another request to ppps1.paybox.com which is trying to perform the same payment again.
The first request to ppps.paybox.com is succeed.
The second request to pps1.paybox.com have the error "00005: Numéro de question invalide" because already treated by the first request.
My question is, how can I increase the timeout of the first request?
Thanks for any help, and btw thanks for your plugin.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.